Content Migration doesn’t seem to have succeeded properly for yum repositories
Yum repositories should be served be pulp3
Foreman and Proxy versions:
Foreman and Proxy plugin versions:
Distribution and version:
Other relevant data:
My coworker and I have been trying to figure this out for a while and we have gone through many of the steps already mentioned in other posts in this forum.
When my coworker first ran the migration instructions mentioned here (Foreman :: Plugin Manuals) he ran into an issue where the migration failed most of the way through. It was marked as success though, even those the repositories were still served via pulp2. Content was migrated to the
/var/lib/pulp/media/ directory, but the apache config for
/pulp/repos and the links in
/var/lib/pulp/published/ did not change.
I picked it up yesterday, as I was trying to use Foreman to run some critical updates, and found that the repositories have not been updated in pulp in quite some time. Upon further inspection, it seems that the following command failed during the migration:
LANG=en_US.utf-8 foreman-installer --foreman-proxy-content-proxy-pulp-isos-to-pulpcore=true --katello-use-pulp-2-for-file=false --katello-use-pulp-2-for-docker=false --katello-use-pulp-2-for-yum=false
The reason that command was failing was because it was trying to run
# pulpcore-manager in the background, which was failing because the
CONTENT_ORIGIN in the
/etc/pulp/settings.py file was “invalid” as it put it.
Upon even further inspection, it would seem that the
pulpcore-content service is only listening on a unix socket and not on a TCP socket. The
CONTENT_ORIGIN is set by the above
foreman-installer command, and is being set to “https://<server_fqdn>”. For some reason,
pulpcore-manager doesn’t like this, and there is no port specifier on the
CONTENT_ORIGIN as is suggested in the pulp docs (Settings — Pulp Project 3.9.1 documentation)
After figuring out a way to foricibly set
CONTENT_ORIGIN to a value that would allow the foreman-installer command above to succeed, we re-ran through the migration steps again, using the methods mentioned elsewhere in this forum (ie. adding things to /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/rails/configuration.rb) and the migration finally succeeded.
The issue, though, is that the smart proxies section of the foreman UI shows yum under pulpcore, but the repos are still being served via pulp2 and are no longer being updated with new content now because the foreman instance thinks it should be generated under pulpcore(pulp3) instead. I am thinking that something is missing to change the apache redirects to the right stuff, but since I had to force the template for the settings.py file to get the migration to work, something else is wrong and it was time to stop and seek further advice. If more information is needed, please let me know. We would like to use foreman to run the updates, but right now we are dead in the water.