Bug 1383763 - Satellite 6.2.2 - bootstrap script legacy option is not properly working
Summary: Satellite 6.2.2 - bootstrap script legacy option is not properly working
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Bootstrap
Version: 6.2.2
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: Rich Jerrido
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks: 1394367
TreeView+ depends on / blocked
 
Reported: 2016-10-11 17:15 UTC by jalviso
Modified: 2020-06-11 13:01 UTC (History)
5 users (show)

Fixed In Version: katello-client-bootstrap-1.2.2-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1394367 (view as bug list)
Environment:
Last Closed: 2016-12-12 17:14:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github /Katello katello-client-bootstrap pull 115 0 None None None 2020-07-06 20:56:27 UTC
Red Hat Product Errata RHBA-2016:2940 0 normal SHIPPED_LIVE Satellite 6.2.5 Async Bug Release 2016-12-12 22:08:21 UTC

Description jalviso 2016-10-11 17:15:02 UTC
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 16:09:35 UTC
(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 15:33:10 UTC
Moving to POST since there is a fix available upstream.

Comment 4 jalviso 2016-10-21 23:59:09 UTC
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 16:13:18 UTC
(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 12:22:05 UTC
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 21:28:19 UTC
(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 10:27:13 UTC
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 17:14: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/RHBA-2016:2940


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