Problem:
After upgrading to Foreman 3.1.2 and Katello 4.3 from Foreman 2.5.2, the Smart Proxies cannot find host groups via the API when registering a host.
Expected outcome:
Successful registration via bootstrap.py script
Foreman and Proxy versions:
Foreman 3.1.2 and Katello 4.3.0-1
Foreman and Proxy plugin versions:
Foreman Proxy 3.1.2-1
Distribution and version:
CentOS 7.9.2009
Other relevant data:
When registering via the bootstrap.py script, we get a 404 Not Found error back
But if I try to use curl to query the Foreman server directly, I get a proper response. However when querying any of my Smart Proxies, I get the 404 Not Found error.
However, this breaks bootstrap as it expects (wrongfully, but it does) to be able to talk the the API on the same port as RHSM (which isn’t true anymore):
I’m glad I’m not going completely mental trying to figure out what’s going on.
Whenever I change the port = 443 to port = 8443 in /etc/rhsm/rhsm.conf though, something in the bootstrap.py process switches it back to 443 (I’m guessing the installation of the SSL certificate from the smart proxy) and I still run into the 404 Error.
@evgeni I deployed the updated bootstrap.py to a test server which I then used to register against my Foreman 3.1.x Smart Proxy. I first tested with the “old” bootstrap.py script just to make sure the 404 Error is still present, which it was.
I then used the updated bootstrap.py script that I pulled down off GitHub and ran it with the same options as the previous failed attempt and it went fully through the registration process for the host, so your changes look good.