Red Hat Bugzilla – Bug 1432184
Task <uuid>: NoMethodError: undefined method `first' for nil:NilClass
Last modified: 2017-09-13 10:45:36 EDT
Description of problem: During subscription-manager register to Sat 6, receive "Task e938b359-b22d-4ce5-8133-b98026895061: NoMethodError: undefined method `first' for nil:NilClass" Version-Release number of selected component (if applicable): 6.2.8 How reproducible: about 50% on the host (may receive lock error) Steps to Reproduce: 1. Setup system as Sat 6 client 2. subscription-manager register Actual results: Task e938b359-b22d-4ce5-8133-b98026895061: NoMethodError: undefined method `first' for nil:NilClass Expected results: Successfully registered system Additional info: Seems to be http://projects.theforeman.org/issues/16547 foreman-debug to follow in private attchment
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16547 has been resolved.
People hitting this issue appear to also be getting the following, after patching over with the changes made in 16547: Error: Runtime Error RESTEASY001185: Could not find resource for relative : /consumers//entitlements of full path: https://localhost:8443/candlepin/consumers//entitlements at org.jboss.resteasy.core.registry.PathParamSegment.matchPattern:209
*** Bug 1432181 has been marked as a duplicate of this bug. ***
Hello. I have patched my system with the commit from foreman issue tracker # 16547 only the first change in app/models/host/base.rb and it has resolved this issue for me. I realize I will have to manually patch my satellite again if I go to 6.2.9 since it's scheduled for 6.2.10 release. I think it's quite critical since it's preventing new systems from being bootstrapped into the satellite, I would re-schedule it to 6.2.9
*** Bug 1434829 has been marked as a duplicate of this bug. ***
Created attachment 1266186 [details] hotfix Hotfix patch tarball Usage (tarball extraction): tar -xzf satellite-hotfix-1432184.tar.gz cd satellite-hotfix-1432184 Usage (dry run): ./satellite-hotfix -n 1432184 Usage: ./satellite-hotfix 1432184 Revert a hotfix: ./satellite-hotfix -r 1432184 List all avaiable hotfixes: ./satellite-hotfix The numbers are real Red Hat Bugzilla numbers. All backup and reject files are save in backups/ sub-directory. Please keep the tarball for possible reverting of the change in the future. If patching fails, revert immediately and report the output. After each Satellite update, this hotfix process must be repeated if the updated does not include the bugfix yet, search in errata notes for bugzilla numbers to confirm. If system-wide Ruby is not installed for some reason, use Satellite Foreman Ruby software collection: scl enable rh-ruby22 -- ./satellite-hotfix -h To find out Ruby versions available do: ls /opt/*/*ruby* -d
VERIFIED. @satellite-6.2.9-2.0.el7sat.noarch foreman-1.11.0.75-1.el7sat.noarch by following manual reproducer: 1. With Sat6.2.8 provision a VM, install and start docker in it (docker has to be running in a VM) # ip address show docker0 3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN link/ether 02:42:6f:94:5a:83 brd ff:ff:ff:ff:ff:ff inet 172.17.0.1/16 scope global docker0 valid_lft forever preferred_lft forever 2. Install CA certs and try to register the VM # subscription-manager register --org="Default_Organization" --name="vm1.example.com" --activationkey="AK" --force The system with UUID 834faa02-bbe9-425f-884d-8dee8c68d9af has been unregistered Task 752a773e-6d7e-45d6-8be6-59d22b556fdf: NoMethodError: undefined method `first' for nil:NilClass >>> reproduced 3. Upgrade 6.2.8 > 6.2.9 4. Register the VM # subscription-manager register --org="Default_Organization" --name="vm1.example.com" --activationkey="AK" --force The system has been registered with ID: 35f937c3-e4f2-4ca3-9281-2bee9e4bb87c Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed >>> specific host (VM hosting docker) now registers successfully
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/RHBA-2017:1191