Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Gen2 Compute profiles #8

Closed
ksagle77 opened this issue Nov 28, 2017 · 14 comments
Closed

Issue with Gen2 Compute profiles #8

ksagle77 opened this issue Nov 28, 2017 · 14 comments
Assignees
Labels

Comments

@ksagle77
Copy link

Hey,

I'm running in to an issue when creating a Gen2 compute profile. I am able to create the a gen 2 profile:

compute_profile

but then once I try to open the profile, I get the following error:

Oops, we're sorry but something went wrong Hyper-V was unable to find a virtual machine with name "foreman_1511888691".
image
image

compute_profile_2

The name 'foreman_1511888691' is static, it does not change based on the name of the profile/host/etc.

I looked for that string in the code, but was unable to find it. Stack trace is attached.

stack_trace_compute.txt

Kevin

@ksagle77
Copy link
Author

Note, I am able to create a gen 2 vm successfully using fog hyper-v directly.

vm = compute.new_vm(
name: 'fogtest',
generation: 2,
path: 'd:\newvms\fogtest',
bootdevice: 'VHD',
vhdpath: 'd:\newvms\fogtest\fogtest.vhdx'
)
image

@ksagle77
Copy link
Author

Interestingly, if I try to create a gen 2 VM, the same error is thrown during the first step of the process.
create_host
host_creation_submit

The VM is created anyways, but the rest of the deployment steps do not complete.

image

@ananace
Copy link
Owner

ananace commented Nov 28, 2017

Worth noting is that the 'foreman_1511888691' is from Foreman itself, when creating a VM object Foreman gives it an unique identifier until the Compute Resource can provide the actual one.

I think I have an idea what the issue might be, which version of fog_hyperv are you running it against?

@ksagle77
Copy link
Author

ksagle77 commented Nov 28, 2017

Ah, cool.

-bash-4.2$ gem list | grep fog-hyperv
fog-hyperv (0.0.5)

@ananace ananace added the bug label Nov 28, 2017
@ananace
Copy link
Owner

ananace commented Nov 28, 2017

Then that's not the issue I'm thinking of.

Can you give me the Foreman version as well, and I'll throw up an environment for that when I'm back at my workstation.

@ananace ananace self-assigned this Nov 28, 2017
@ksagle77
Copy link
Author

rpm -qa 'foreman' || dpkg -l 'foreman' | sort

foreman-1.15.6-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.10.2-1.el7.noarch
foreman-debug-1.15.6-1.el7.noarch
foreman-proxy-1.15.6-1.el7.noarch
foreman-cli-1.15.6-1.el7.noarch
foreman-installer-1.15.6-2.el7.noarch
foreman-selinux-1.15.6-1.el7.noarch
foreman-release-scl-3-1.el7.noarch
foreman-postgresql-1.15.6-1.el7.noarch
tfm-rubygem-foreman_setup-5.0.0-1.fm1_13.el7.noarch
foreman-release-1.15.6-1.el7.noarch

@ananace
Copy link
Owner

ananace commented Nov 28, 2017

👍 Thanks, I'll try and get back to you tomorrow once I've had time to test it out myself, see if I can replicate the bug.

@ksagle77
Copy link
Author

Awesome, thanks! I'm trying to debug as well, but am fairly new to ruby. Do you have an idea on whether the issue would be in fog-hyperv, or foreman-hyperv?

@ananace
Copy link
Owner

ananace commented Nov 28, 2017

I think it's most likely a foreman-hyperv issue, and I have a rather good idea what might be causing it as well.

Sadly don't have any of the things I need to try the changes out myself at hand.

@ksagle77
Copy link
Author

Cool. If there's anything I can do to help, let me know.

ananace added a commit that referenced this issue Nov 28, 2017
@ananace
Copy link
Owner

ananace commented Nov 28, 2017

As a quick hack just to see if my hypothesis holds any water, you could try applying the change from the commit I just pushed.

@ksagle77
Copy link
Author

Awesome, the error no longer appears after applying those changes!

@ananace
Copy link
Owner

ananace commented Nov 28, 2017

Great, then I'll have a starting point for making a proper fix once I'm in place and can test my code properly.

@ananace
Copy link
Owner

ananace commented Dec 15, 2017

Fix is merged into master as of bfbb7af, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants