Bug #26156
closedClone vm fails with error "TypeError: no implicit conversion of nil into String" if host is disassociated
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1677916
Description of problem: Cloning disassociated host fails with error
2019-02-16T14:26:39 [I|app|4c181046] Processing by HostsController#clone as HTML
2019-02-16T14:26:39 [I|app|4c181046] Parameters: {"id"=>"tower.example.com"}
2019-02-16T14:26:39 [I|app|4c181046] Current user set to admin (admin)
2019-02-16T14:26:39 [W|app|4c181046] Action failed
TypeError: no implicit conversion of nil into String
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-libvirt-0.4.1/lib/fog/libvirt/requests/compute/list_domains.rb:9:in `lookup_domain_by_uuid'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-libvirt-0.4.1/lib/fog/libvirt/requests/compute/list_domains.rb:9:in `list_domains'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-libvirt-0.4.1/lib/fog/libvirt/models/compute/servers.rb:15:in `get'
/usr/share/foreman/app/models/compute_resource.rb:181:in `find_vm_by_uuid'
/usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:40:in `find_vm_by_uuid'
/usr/share/foreman/app/models/compute_resource.rb:335:in `vm_compute_attributes_for'
/usr/share/foreman/app/models/compute_resources/foreman/model/libvirt.rb:190:in `vm_compute_attributes_for'
/usr/share/foreman/app/models/host/managed.rb:654:in `clone'
/usr/share/foreman/app/controllers/hosts_controller.rb:93:in `clone'
Version-Release number of selected component (if applicable): 6.5.0
How reproducible: Always
Steps to Reproduce:
1. Go to all host, edit host and disassociate host
2. Now go back to host profile and click on "clone"
Oops, we're sorry but something went wrong no implicit conversion of nil into String
This is working in Satellite 6.4.2
Updated by Marek Hulán about 5 years ago
- Subject changed from Clone vm fails with error "TypeError: no implicit conversion of nil into String" if host is disassociated to Clone vm fails with error "TypeError: no implicit conversion of nil into String" if host is disassociated
- Status changed from New to Resolved
no longer reproducible per Ori's findings