Bug #29589
closedsmart proxy registers prior to pulpcore being available
Description
I'm not sure what has changed, but it seems that the smart proxy registration is now happening before pulpcore is fully up and serving its capabilities. This results in katello preferring pulp2 for file/docker content instead of pulp3.
After install you can see in the foreman proxy logs:
2020-04-21T20:56:38 131ba2fb [E] Could not fetch capabilities: 765: unexpected token at '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Unavailable</title>
</head><body>
<h1>Service Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>
'
Refreshing the smart proxy after install causes the problem to correct itself. You can check this on the console too:
SmartProxyFeature.joins(:feature).where("features.name" => "Pulpcore")
The capabilities will be blank
This is the cause of the current pipeline failure: https://ci.centos.org/job/foreman-katello-nightly-test/828/tapResults/
The foreman proxy w/content can't sync because the repository was created in pulp2, but is being served from pulp3 via apache.