Description of problem:
When trying to perform bulk action "Manage Repository Sets" on Content Hosts, if a Content Host has never registered, it will fail and return an undefined method error:
NoMethodError: undefined method `uuid' for nil:NilClass
Version-Release number of selected component (if applicable):
Red Hat Satellite 6.3.1
How reproducible: Easily, always?
Steps to Reproduce:
1. Create a Host: WebUI-> Hosts -> All Hosts -> Create Host - But do not actually build one yet or register that host.
2. Go to WebUI -> Content Hosts and select a number of hosts, including the one just created (which should show as "Never registered" and "Never checked in"
3. Select "Select Action" -> "Manage Repository Sets" and choose a Repository set and either "Override to Enabled" or "Override to disabled"
The task "Update Contennt Overrides to <content-host>" will fail with an error simply saying "undefined method `uuid' for nil:NilClass"
The task should still fail, or give a warning, more gracefully with an explanation of the failure rather than the undefined method error.
Created redmine issue http://projects.theforeman.org/issues/23887 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/23887 has been resolved.
Created attachment 1482126 [details]
Verified - Mange repository set success
@ Satellite 6.4 snap 20
1. Created a Host which is not registered and not checked in.
2. From WebUI -> Content Hosts and selected a number of hosts, including the one just created (which should show as "Never registered" and "Never checked in"
3. Selected "Select Action" -> "Manage Repository Sets" and choose a Repository set and either "Override to Enabled".
The task did not fail, and just posted a warning, with an explanation of the failure.
Verification screenshot attached.
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.