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 1432184 - Task <uuid>: NoMethodError: undefined method `first' for nil:NilClass
Summary: Task <uuid>: NoMethodError: undefined method `first' for nil:NilClass
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts
Version: 6.2.8
Hardware: Unspecified
OS: Unspecified
high
high with 1 vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lukas Pramuk
URL:
Whiteboard:
: 1432181 1434829 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-14 17:57 UTC by Thom Carlin
Modified: 2024-06-13 20:47 UTC (History)
31 users (show)

Fixed In Version: foreman-1.11.0.74-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1435325 (view as bug list)
Environment:
Last Closed: 2017-05-01 14:01:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
hotfix (22.43 KB, application/x-gzip)
2017-03-24 16:04 UTC, Chris Roberts
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16547 0 Normal Closed Fact importing fails with NoMethodError: undefined method `first' for nil:NilClass 2020-06-03 01:39:24 UTC
Red Hat Knowledge Base (Solution) 3019461 0 None None None 2017-05-01 18:33:42 UTC
Red Hat Product Errata RHBA-2017:1191 0 normal SHIPPED_LIVE Satellite 6.2.9 Async Bug Release 2017-05-01 17:49:42 UTC

Description Thom Carlin 2017-03-14 17:57:34 UTC
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

Comment 2 Satellite Program 2017-03-14 18:18:35 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16547 has been resolved.

Comment 3 Craig Donnelly 2017-03-14 18:22:13 UTC
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

Comment 7 Brad Buckingham 2017-03-17 15:19:03 UTC
*** Bug 1432181 has been marked as a duplicate of this bug. ***

Comment 8 Johan Bergström 2017-03-22 15:36:42 UTC
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

Comment 12 Sean O'Keeffe 2017-03-23 14:50:52 UTC
*** Bug 1434829 has been marked as a duplicate of this bug. ***

Comment 13 Chris Roberts 2017-03-24 16:04:45 UTC
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

Comment 15 Lukas Pramuk 2017-04-03 14:03:18 UTC
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

Comment 19 errata-xmlrpc 2017-05-01 14:01:02 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/RHBA-2017:1191


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