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 1905419 - global registration fails with ERROR: undefined method '#login' for NilClass::Jail (NilClass)
Summary: global registration fails with ERROR: undefined method '#login' for NilClass:...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.9.0
Assignee: satellite6-bugs
QA Contact: tstrych
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-08 10:10 UTC by Peter Ondrejka
Modified: 2023-09-15 00:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-11 12:02:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Ondrejka 2020-12-08 10:10:21 UTC
Description of problem:

Attempt to register a host via global registration template with only AK setting supplied, the curl command exists after s-m registration with:

ERROR: There was an error rendering the Global Registration template: undefined method '#login' for NilClass::Jail (NilClass)


Version-Release number of selected component (if applicable):
Satellite 6.9

Sat 6.9 snap 4

How reproducible:
always

Steps to Reproduce:
1. have an AK, a registration template assigned to the os
2. hosts > register hosts 
3. fill in just the activation key, generate curl command
4. run the curl command on a host (the os matches the os in satellite)

Actual results:
no registration with the above error

Expected results:
success or better error messagee

Additional info:

Comment 1 Peter Ondrejka 2020-12-08 13:08:45 UTC
Closing after discussion with lstejskal, caused by mis-assignment of the global registration template to the OS, we will work on figuring out ways to prevent this in future

Comment 2 Mike McCune 2021-01-15 18:17:52 UTC
I filed the below to help reduce confusion:

https://bugzilla.redhat.com/show_bug.cgi?id=1916892

After associating my OS to the Global Registration Template, I still see the above error, and as a user I would have no idea how to resolve this. Going to re-open as the above error still occurs on Snap 9

Comment 3 Marek Hulan 2021-01-18 15:18:28 UTC
Mike, do you have reproducing steps? Are you sure you have associated Global Registration Template and not the Linux Registration Template like the reporter? Note that the automatic association of GRT is resolved and better UX for generic templates association is discussed at https://community.theforeman.org/t/rfc-operating-systems-and-templates/21604/28, anyone please add a comment there if you have a some other suggestion on how to improve it furter.

Comment 4 Marek Hulan 2021-01-25 07:23:21 UTC
Just for clarification, Global Registration Template is not meant to be assigned to host. Perhaps we could add a detection to GRT and display error in case @host is set (not nil) that would warn user, they probably assigned wrong template.

Comment 5 Marek Hulan 2021-02-11 12:02:46 UTC
I think this has been fixed meanwhile by auto-assigning HRT to newly created OS (RedHat), which was verified by https://bugzilla.redhat.com/show_bug.cgi?id=1905500, users should no longer encounter this. There's also a nicer fix in the upstream, that prevents assigning global registration template by changing its kind, but that's too big to cherrypick.

Given the above I'm closing this one. If you feel we should add extra warning even after the correct template is auto-assigned, pleaese reopen. However the BZ was reported on snap 4 where the manual step was still necessary and could lead to misconfiguration.

Comment 6 Red Hat Bugzilla 2023-09-15 00:52:39 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


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