Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1383763 - Satellite 6.2.2 - bootstrap script legacy option is not properly working
Satellite 6.2.2 - bootstrap script legacy option is not properly working
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Bootstrap (Show other bugs)
6.2.2
All Linux
unspecified Severity medium (vote)
: 6.2.5
: Unused
Assigned To: Rich Jerrido
Peter Ondrejka
: Triaged
Depends On:
Blocks: 1394367
  Show dependency treegraph
 
Reported: 2016-10-11 13:15 EDT by jalviso
Modified: 2017-07-13 08:41 EDT (History)
5 users (show)

See Also:
Fixed In Version: katello-client-bootstrap-1.2.2-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1394367 (view as bug list)
Environment:
Last Closed: 2016-12-12 12:14:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Github /Katello/katello-client-bootstrap/pull/115 None None None 2016-11-18 11:06 EST
Red Hat Product Errata RHBA-2016:2940 normal SHIPPED_LIVE Satellite 6.2.5 Async Bug Release 2016-12-12 17:08:21 EST

  None (edit)
Description jalviso 2016-10-11 13:15:02 EDT
Description of problem:

We tested the legacy option of bootstrap script. The legacy (Satellite 5) functionality of the script is broken.

* There is no legacy server option to provide and as a result it just assumes the legacy server to be the foreman server. 

* There is no prompt for the legacy-password - the legacy password goes through as 'none'

The host appears to register ok with foreman/Satellite 6 however: 

* The host does not join the host collection that is associated with activation key

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

How reproducible: Always

Steps to Reproduce:
1. Run below command:

./bootstrap.py -s satellite62.example.com -l admin --legacy-login=sat5-admin --legacy-purge -a Dev_RHEL6 -P -g "Development - RHEL 6" -L BNE -o TEST -v -R


Actual results:

Not working

Expected results:

Legacy options should work.


Additional info:

There is also a mistake in the help message of the script:
*  --partitiontable=PARTITIONTABLE
                        Name of the Operating System in Foreman that the host
                        is to be associated with
Comment 1 Rich Jerrido 2016-10-13 12:09:35 EDT
(In reply to jalviso from comment #0)
> Description of problem:
> 
> We tested the legacy option of bootstrap script. The legacy (Satellite 5)
> functionality of the script is broken.
> 
> * There is no legacy server option to provide and as a result it just
> assumes the legacy server to be the foreman server. 

The 'legacy server' is read from /etc/sysconfig/rhn/up2date by the rhn-migrate-classic-to-rhsm script, so there is nothing to prompt for. 
> 
> * There is no prompt for the legacy-password - the legacy password goes
> through as 'none'
> 

You are correct. The script did not prompt for a legacy password if --legacy-purge is passed. 

The fixes in this pull request (https://github.com/Katello/katello-client-bootstrap/pull/116) will address this. Give this version a try to see if it resolves your issues.

> The host appears to register ok with foreman/Satellite 6 however: 
> 
> * The host does not join the host collection that is associated with
> activation key
> 

It is possible this failed because the call to rhn-migrate-classic-to-rhsm fails. 


> Version-Release number of selected component (if applicable): 6.2.2
> 
> How reproducible: Always
> 
> Steps to Reproduce:
> 1. Run below command:
> 
> ./bootstrap.py -s satellite62.example.com -l admin --legacy-login=sat5-admin
> --legacy-purge -a Dev_RHEL6 -P -g "Development - RHEL 6" -L BNE -o TEST -v -R
> 
> 
> Actual results:
> 
> Not working
> 
> Expected results:
> 
> Legacy options should work.
> 
> 
> Additional info:
> 
> There is also a mistake in the help message of the script:
> *  --partitiontable=PARTITIONTABLE
>                         Name of the Operating System in Foreman that the host
>                         is to be associated with

This is addressed here (https://github.com/Katello/katello-client-bootstrap/pull/115)
Comment 2 Brad Buckingham 2016-10-14 11:33:10 EDT
Moving to POST since there is a fix available upstream.
Comment 4 jalviso 2016-10-21 19:59:09 EDT
Hi Rich,

Thank you so much for your prompt reply. 
Customer tried git pull (116) and it works as expected.

The remaining items from bootstrap script that needs looking after would be configuring puppet on the client:

- configure the client puppet.conf file according to the host group 
- Send puppet CSR to satellite
- sign the puppet CSR on satellite
- Run 'puppet agent -t' on the client
- chkconfig and start the agent


Regards,

Josephine Alviso
GSS - APAC
Comment 5 Rich Jerrido 2016-10-24 12:13:18 EDT
(In reply to jalviso from comment #4)
> Hi Rich,
> 
> Thank you so much for your prompt reply. 
> Customer tried git pull (116) and it works as expected.
> 
> The remaining items from bootstrap script that needs looking after would be
> configuring puppet on the client:
> 
> - configure the client puppet.conf file according to the host group 
> - Send puppet CSR to satellite
> - sign the puppet CSR on satellite
> - Run 'puppet agent -t' on the client
> - chkconfig and start the agent
> 
> 
> Regards,
> 
> Josephine Alviso
> GSS - APAC

What's missing or can be improved? All of the above functionalities exist and work today. If there are additional features needed (or bugs found), can you open a separate BZ for these?
Comment 7 Peter Ondrejka 2016-12-02 07:22:05 EST
The changes introduced in https://github.com/Katello/katello-client-bootstrap/pull/116/files are not present in the bootstrap.py shipped with katello-client-bootstrap-1.2.0-4.el7sat.noarch. It turns out these were (accidentally?) removed in commit https://github.com/Katello/katello-client-bootstrap/commit/15c6d151baecf11e5264b9385853abcc5dd6839e therefore they are not in the latest version on github either.
Comment 8 Rich Jerrido 2016-12-02 16:28:19 EST
(In reply to Peter Ondrejka from comment #7)
> The changes introduced in
> https://github.com/Katello/katello-client-bootstrap/pull/116/files are not
> present in the bootstrap.py shipped with
> katello-client-bootstrap-1.2.0-4.el7sat.noarch. It turns out these were
> (accidentally?) removed in commit
> https://github.com/Katello/katello-client-bootstrap/commit/
> 15c6d151baecf11e5264b9385853abcc5dd6839e therefore they are not in the
> latest version on github either.


Good find. The removal of those option was unintentional. This PR (https://github.com/Katello/katello-client-bootstrap/pull/140) remediates this.
Comment 10 Peter Ondrejka 2016-12-12 05:27:13 EST
Verified in Satellite 6.2.5 snap 3, bootstrap now correctly prompts for legacy password if purge option is specified. Mistake in help also fixed.
Comment 11 errata-xmlrpc 2016-12-12 12:14:48 EST
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-2016:2940

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