Project

General

Profile

Actions

Bug #32423

closed

VM UUID error after upgrading to 2.4.0

Added by Santiago Ruiz about 3 years ago. Updated about 3 years ago.

Status:
Rejected
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

After upgrading foreman to 2.4.0 we can no longer create hosts using libvirt compute resource. When creating the host the VM is created on libvirt side (with the correct UUID) but for some reason the UUID stored for the vm on foreman side is wrong it adds “8_” in front of the UUID.
This generates an error since foreman is not able to start the VM cause it cannot find it with the incorrect UUID on libvirt.

Part of the log:

...
2021-04-23T09:53:01 [I|aud|644f05ab] Host::Base (606) create event on use_image 
2021-04-23T09:53:01 [I|aud|644f05ab] Host::Base (606) create event on image_file 
2021-04-23T09:53:01 [I|aud|644f05ab] Host::Base (606) create event on uuid 8_f193b5c0-a69c-41f6-a07e-724db2efecca
2021-04-23T09:53:01 [I|aud|644f05ab] Host::Base (606) create event on compute_resource_id 8
2021-04-23T09:53:01 [I|aud|644f05ab] Host::Base (606) create event on puppet_proxy_id 1
....
2021-04-23T09:53:03 [I|app|66957c2e] Backtrace for 'Failed retrieving libvirt vm by uuid 8_f193b5c0-a69c-41f6-a07e-724db2efecca' error (Libvirt::RetrieveError): Call to virDomainLookupByUUID failed: Invalid UUID
 66957c2e | /usr/share/foreman/vendor/ruby/2.5.0/gems/fog-libvirt-0.8.0/lib/fog/libvirt/requests/compute/list_domains.rb:9:in `lookup_domain_by_uuid'
 66957c2e | /usr/share/foreman/vendor/ruby/2.5.0/gems/fog-libvirt-0.8.0/lib/fog/libvirt/requests/compute/list_domains.rb:9:in `list_domains'
 66957c2e | /usr/share/foreman/vendor/ruby/2.5.0/gems/fog-libvirt-0.8.0/lib/fog/libvirt/models/compute/servers.rb:15:in `get'
 66957c2e | /usr/share/foreman/app/models/compute_resource.rb:183:in `find_vm_by_uuid'
 66957c2e | /usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:43:in `find_vm_by_uuid'
 66957c2e | /usr/share/foreman/app/controllers/hosts_controller.rb:280:in `vm'
 66957c2e | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.5/lib/action_controller/metal/basic_implicit_render.rb:

Expected outcome: Create the host and associate the vm with the correct UUID

Foreman version: 2.4.0
Proxy versions: 2.4.0

Distribution and version:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

Actions #1

Updated by Lukas Zapletal about 3 years ago

Hello, I have just tested both 2.4 and nightly and I have no problems, it works just fine and there is no ID_ prefix on my uuids.

I suggest you to take this to our Discourse forum for faster response time. My first question would be - any plugins? Lets continue there tho.

Actions #2

Updated by Santiago Ruiz about 3 years ago

Lukas Zapletal wrote:

Hello, I have just tested both 2.4 and nightly and I have no problems, it works just fine and there is no ID_ prefix on my uuids.

I suggest you to take this to our Discourse forum for faster response time. My first question would be - any plugins? Lets continue there tho.

Hi Lukas,
you are right the issue is caused by the ruby-foreman-fog-proxmox plugin. I removed it and the issue went away, will go ahead and submit a ticket on their github page.

Thanks for the support!

Actions #3

Updated by Lukas Zapletal about 3 years ago

  • Status changed from New to Closed

Can you paste the issue link in here for the record please? Thanks.

Actions #4

Updated by Tomer Brisker about 3 years ago

  • Status changed from Closed to Rejected
Actions

Also available in: Atom PDF