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%
*** Bug 1268429 has been marked as a duplicate of this bug. ***
Switching to POST as this commit - https://github.com/Katello/katello-client-bootstrap/commit/c1d5d606cc55d41b930b6f786287ba70a9e1768c is merged upstream.
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.
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 ---|---------------------------------------------------|------------------|------------|--------------|-------------------|--------------|----------------------
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