Hide Forgot
Description of problem: The last step of a bootstrap registration of an older box (likely unpatched) is resulting in a 201 error... Suggestion is that it has todo with the URLLIB2 module not accepting the response properly. Version-Release number of selected component (if applicable): 6.2.2 SAT 5.9 Client How reproducible: Occurring with all fossilized redhats 5.9 definitely, going to try to "patch one up to current and retry" but this is a production system so it will take me some time. The servers are disconnected from all external networks, so the SAT is the first time they have seen a real live connection in years. Steps to Reproduce: 1. Need an old machine (mine is redhat 5.9 likely not patched since the cold war) 2. Try to connect it to the new shiny SAT I have wget http://rhn-satellite.tools.cihs.gov.on.ca/pub/bootstrap.py chmod +x bootstrap.py ./bootstrap.py -l ADMIN -s SATSERVER -o ORG -L LOC -g GROUP -a AKEY 3. error occurs on JSON post Actual results: Gets a 201 but there is no real error I can find [RUNNING], [2016-12-03 06:34:37], [Calling Foreman API to create a host entry associated with the group, org & location] Error: The following error occured while talking to the API: url: https://rhn-satellite.tools.cihs.gov.on.ca:443/api/v2/hosts/ code: 201 data: { "host": { "managed": "false", "name": "xxxxxx", "hostgroup_id": 2, "organization_id": 1, "mac": "00:50:56:AB:21:C1", Expected results: should have been clean. Additional info: [I think this guy has what I think it is, and it explains the behavior well] https://access.redhat.com/discussions/2621401 Rich Jerrido The error that you are seeing is a red herring. The issue is that the urllib2 (the python library we use for all the calls to the API) doesn't handle the HTTP 201 that the API returns correctly. That is, your host is created properly, but an exception is raised as if it wasn't. If you could open a BZ for this issue, that would be appreciated.
I cut a RedHat support case for this (CASE 01751585)
This is fixed since katello-client-bootstrap-1.2.0, no need to wait for 6.3.
Verified. Tested on Satellite 6.3 Snap 13 - although I think this is on 6.2 too. After registering a new host with ./bootstrap.py -l ADMIN -s SATSERVER -o ORG -L LOC -g GROUP -a AKEY no urllib2 error is shown on the screen and the Host is created fine.
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:0336