Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1539076 - [RFE] as a user of the bootstrap script, I'd like to specify a location even if I am using the --skip foreman option.
[RFE] as a user of the bootstrap script, I'd like to specify a location even ...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Bootstrap (Show other bugs)
6.3.0
Unspecified Unspecified
low Severity low (vote)
: GA
: Unused
Assigned To: Rich Jerrido
Radovan Drazny
: FutureFeature, Triaged
: 1268429 (view as bug list)
Depends On:
Blocks: 1420851
  Show dependency treegraph
 
Reported: 2018-01-26 10:16 EST by Rich Jerrido
Modified: 2018-10-16 11:31 EDT (History)
3 users (show)

See Also:
Fixed In Version: katello-client-bootstrap-1.6.0
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-16 11:30:08 EDT
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/issues/186 None None None 2018-02-08 08:55 EST
Red Hat Product Errata RHSA-2018:2927 None None None 2018-10-16 11:31 EDT

  None (edit)
Description Rich Jerrido 2018-01-26 10:16:55 EST
Description of problem:

As a user, when registering a host, I am using --skip foreman to register hosts without username/password as I am registering them for content only. I'd like the ability to set the host's location without needing a username / password


Version-Release number of selected component (if applicable):
katello-client-bootstrap. 

How reproducible:
100%
Comment 2 Rich Jerrido 2018-02-26 14:30:15 EST
*** Bug 1268429 has been marked as a duplicate of this bug. ***
Comment 3 Rich Jerrido 2018-04-05 09:36:28 EDT
Switching to POST as this commit - https://github.com/Katello/katello-client-bootstrap/commit/c1d5d606cc55d41b930b6f786287ba70a9e1768c is merged upstream.
Comment 5 Rich Jerrido 2018-08-09 19:21:30 EDT
Verification steps:

On a Satellite which has greater than 1 location, run a command similar to the following on the client to register it when using the --skip-foreman option also passing -L to specify a location. 

Option 1: using the --skip foreman option.

# ./bootstrap.py -s foreman.example.com \
    -a ak_Reg_To_Dev_EL7 \
    -o "Red_Hat" \
    --skip foreman \
    -L 'My_Location'

Option 2 : using the --content-only option. This option exists as an alias to --skip foreman.

# ./bootstrap.py -s foreman.example.com \
    -a ak_Reg_To_Dev_EL7 \
    -o "Red_Hat" \
    --content-only \
    -L 'My_Location' 


Ensure that the client is registered in the correct organization & location.
Comment 7 Radovan Drazny 2018-09-11 08:05:05 EDT
Verified on Sat 6.4 Snap 21

hammer> organization list
---|----------------------|----------------------|-------------|----------------------|------------
ID | TITLE                | NAME                 | DESCRIPTION | LABEL                | DESCRIPTION
---|----------------------|----------------------|-------------|----------------------|------------
1  | Default Organization | Default Organization |             | Default_Organization |            
5  | Shadow Organization  | Shadow Organization  |             | Shadow_Org           |            
---|----------------------|----------------------|-------------|----------------------|------------
hammer> location list
---|----------------------------------|-----------------------|------------
ID | TITLE                            | NAME                  | DESCRIPTION
---|----------------------------------|-----------------------|------------
2  | Default Location                 | Default Location      |            
4  | SelfSupportedLocation            | SelfSupportedLocation |            
---|----------------------------------|-----------------------|------------



Client 1: 

$ hostname
client1.example.com

$ ./bootstrap.py --force -s satellite.example.com -a TestAK1 -o "Shadow_Org" --skip foreman -L "SelfSupportedLocation"                                                                              
Foreman Bootstrap Script
<...>
[SUCCESS], [2018-09-11 06:28:52], [/usr/sbin/subscription-manager register --org 'Shadow_Org' --name 'client1.example.com' --activationkey 'TestAK1'  --serverurl=https://dell-pem630-01.rhts.eng.bos.redhat.c
om:443/rhsm --baseurl=https://satellite.example.com/pulp/repos --force], completed successfully.
<...>


Client 2:

$ hostname
client2.example.com

$./bootstrap.py --force -s satellite.example.com -a TestAK1 -o "Shadow_Org" --content-only -L "SelfSupportedLocation"
<...>
[SUCCESS], [2018-09-11 07:59:53], [/usr/sbin/subscription-manager register --org 'Shadow_Org' --name 'client2.example.com' --activationkey 'TestAK1'  --serverurl=https://satellite.example.com:443/rhsm --baseurl=https://satellite.example.com/pulp/repos --force], completed successfully.
<...>

Result:
hammer> host list --location-id 4
---|---------------------------------------------------|------------------|------------|--------------|-------------------|--------------|----------------------
ID | NAME                                              | OPERATING SYSTEM | HOST GROUP | IP           | MAC               | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|---------------------------------------------------|------------------|------------|--------------|-------------------|--------------|----------------------
2  | client1.example.com                               | RedHat 7.4       |            | 172.16.20.40 | fa:16:3e:16:b5:ac | CentosCV     | ShadowEnv            
3  | client2.example.com                               | RHEL Server 7.5  |            | 10.12.0.22   | 00:1a:64:33:d5:08 | CentosCV     | ShadowEnv            
---|---------------------------------------------------|------------------|------------|--------------|-------------------|--------------|----------------------
hammer> host list --organization-id 5
---|---------------------------------------------------|------------------|------------|--------------|-------------------|--------------|----------------------
ID | NAME                                              | OPERATING SYSTEM | HOST GROUP | IP           | MAC               | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|---------------------------------------------------|------------------|------------|--------------|-------------------|--------------|----------------------
2  | client1.example.com                               | RedHat 7.4       |            | 172.16.20.40 | fa:16:3e:16:b5:ac | CentosCV     | ShadowEnv            
3  | client2.example.com                               | RHEL Server 7.5  |            | 10.12.0.22   | 00:1a:64:33:d5:08 | CentosCV     | ShadowEnv            
---|---------------------------------------------------|------------------|------------|--------------|-------------------|--------------|----------------------
Comment 9 errata-xmlrpc 2018-10-16 11:30:08 EDT
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-2018:2927

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