Bug 1618811 - boostrap.py fails when registering nodes with org_environment contentAccessMode
Summary: boostrap.py fails when registering nodes with org_environment contentAccessMode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Bootstrap
Version: 6.3.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.5.0
Assignee: Rich Jerrido
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-17 16:21 UTC by sthirugn@redhat.com
Modified: 2023-03-24 14:11 UTC (History)
5 users (show)

Fixed In Version: katello-client-bootstrap-1.7.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:37:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Katello katello-client-bootstrap issues 260 0 'None' 'closed' 'Allow bootstrap.py to optionally ignore subscription-manager error when there are no subscriptions allocated.' 2019-11-26 05:42:23 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:37:57 UTC

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


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