Project

General

Profile

Actions

Bug #26156

closed

Clone vm fails with error "TypeError: no implicit conversion of nil into String" if host is disassociated

Added by Marek Hulán over 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Compute resources - libvirt
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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

Actions

Also available in: Atom PDF