Bug 1677916 - Clone vm fails with error "TypeError: no implicit conversion of nil into String" if host is disassociated
Summary: Clone vm fails with error "TypeError: no implicit conversion of nil into Stri...
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Compute Resources - libvirt
Version: 6.5.0
Hardware: All
OS: All
medium vote
Target Milestone: Released
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
Depends On:
TreeView+ depends on / blocked
Reported: 2019-02-16 20:04 UTC by Ranjan Kumar
Modified: 2019-10-07 17:19 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-14 12:40:09 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:40:23 UTC
Foreman Issue Tracker 26156 None None None 2019-02-26 08:27:51 UTC

Description Ranjan Kumar 2019-02-16 20:04:27 UTC
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

Comment 3 Marek Hulan 2019-02-26 08:27:50 UTC
Created redmine issue https://projects.theforeman.org/issues/26156 from this bug

Comment 4 Marek Hulan 2019-02-26 08:29:01 UTC
seems we need to clean more attributes, such as compute attributes on disassociation

Comment 5 orabin 2019-04-01 08:38:39 UTC
Does this still happen with 6.5 Beta?
I wasn't able to reproduce upstream.

Comment 6 Ranjan Kumar 2019-04-02 08:08:19 UTC
@orabin, This issue is not reproducible this on latest snap of satellite 6.5

Comment 7 orabin 2019-04-02 09:58:28 UTC
Thanks for checking! I'm moving this to ON_QA

Comment 8 Lukáš Hellebrandt 2019-04-11 13:20:03 UTC
Also can't reproduce using reproducer from OP => Verified with Sat 6.5 snap 23.

Comment 10 errata-xmlrpc 2019-05-14 12:40:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.