Bug 1618811

Summary: boostrap.py fails when registering nodes with org_environment contentAccessMode
Product: Red Hat Satellite Reporter: sthirugn <sthirugn>
Component: BootstrapAssignee: Rich Jerrido <rjerrido>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.2CC: egolov, ehelms, rjerrido, sthirugn, zhunting
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-client-bootstrap-1.7.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:37:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sthirugn@redhat.com 2018-08-17 16:21:55 UTC
Description of problem:
boostrap.py fails when registering nodes with org_environment contentAccessMode

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

How reproducible:
Always

Steps to Reproduce:
1. Enable org_environment contentAccessMode in Satellite
2. Create an activation key with no subscriptions (Auto attach set to true - optional)
3. Register a client to Satellite

Actual results:
bootstrap.py fails since subscription-manager register returns 1 if there are no subscriptions found.

#  subscription-manager register --org="Austin" --activationkey="default" --force
Unregistering from: satellite.example.com:443/rhsm
The system with UUID 795d2cfa-1c14-4fd3-810f-111e43fec963 has been unregistered
All local data removed
The system has been registered with ID: 043dc810-339f-4655-8186-3f1e532567a5 

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Not Subscribed

Unable to find available subscriptions for all your installed products.
# echo $?
1

Expected results:
In org_environment contentAccessMode it is okay to not have a subscription at the time of registration.  There should be a way to bypass this error and finish bootstrap process.

Additional info:
workaround: Search for `subscription-manager register` in bootstrap.py and change it from `exec_failexit` to `exec_failok`

Comment 4 Zach Huntington-Meath 2019-01-02 21:11:03 UTC
Rich, just wanting to make sure, is this issue solved by https://github.com/Katello/katello-client-bootstrap/pull/261 ?

Comment 5 Evgeni Golov 2019-01-07 13:27:46 UTC
(In reply to Zach Huntington-Meath from comment #4)
> Rich, just wanting to make sure, is this issue solved by
> https://github.com/Katello/katello-client-bootstrap/pull/261 ?

Yes it was.

Please don't cherry pick bootstrap, we'll release a new version for 6.5 inclusion soon™.

Comment 10 Evgeni Golov 2019-02-01 08:02:37 UTC
You still need to call bootstrap.py with --ignore-registration-failures for this to work :)

Comment 20 errata-xmlrpc 2019-05-14 12:37:48 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