Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - libvirt
Version: 6.5.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: 6.5.0
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-16 20:04 UTC by Ranjan Kumar
Modified: 2019-11-05 22:45 UTC (History)
5 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 26156 0 Normal Resolved Clone vm fails with error "TypeError: no implicit conversion of nil into String" if host is disassociated 2020-11-24 13:50:14 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:40:23 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.

https://access.redhat.com/errata/RHSA-2019:1222


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