Request for all steps for Migrating from pulp_installer to a multi-process container on RHEL 9.X

Before :

pip list |grep -i pulp

pulp-cli 0.34.0
pulp-container 2.14.18
pulp-file 1.12.0
pulp-glue 0.34.0
pulp-rpm 3.19.13
pulpcore 3.22.35

Operating system - distribution and version: RHEL 9.7

Could you please provide the complete set of prerequisites and step-by-step instructions required for RHEL 9.x?

https://pulpproject.org/pulp-oci-images/docs/admin/guides/migrate-pulp-installer-to-multi-process/#migrate-from-pulp_installer-to-a-multi-process-container

we are getting these error logs and pulp is not working on the container
podman logs:

/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
/usr/local/lib/python3.11/site-packages/requests/init.py:113: RequestsDependencyWarning: urllib3 (2.6.3) or chardet (6.0.0.post1)/charset_normalizer (3.4.4) doesn’t match a supported version!
warnings.warn(
/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
/usr/local/lib/python3.11/site-packages/requests/init.py:113: RequestsDependencyWarning: urllib3 (2.6.3) or chardet (6.0.0.post1)/charset_normalizer (3.4.4) doesn’t match a supported version!
warnings.warn(
/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
/usr/local/lib/python3.11/site-packages/requests/init.py:113: RequestsDependencyWarning: urllib3 (2.6.3) or chardet (6.0.0.post1)/charset_normalizer (3.4.4) doesn’t match a supported version!
warnings.warn(
/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
/usr/local/lib/python3.11/site-packages/requests/init.py:113: RequestsDependencyWarning: urllib3 (2.6.3) or chardet (6.0.0.post1)/charset_normalizer (3.4.4) doesn’t match a supported version!
warnings.warn(

on the container:

[root@7851876856ca /]# pip list |grep -i pulp
pulp-ansible 0.29.4
pulp-certguard 1.8.0
pulp-container 2.27.1
pulp-deb 3.8.1
pulp-file 1.16.0
pulp-gem 0.7.5
pulp-glue 0.37.0
pulp-glue-gem 0.5.3
pulp-hugging-face 0.3.0
pulp-maven 0.12.0
pulp-npm 0.5.0
pulp-ostree 2.6.0
pulp-python 3.25.1
pulp-rpm 3.35.0
pulpcore 3.103.4

Hmm, not sure how up to date any of the info on this page is. One weird thing is the DB exceptions we do for Fedora 36 and Ubuntu 22, not sure why we instruct to keep an external DB outside the container.

Here’s what I would do for EL9:

  1. Make backups of settings, storage artifacts and DB: pg_dump -U postgres -Fc -b -f "/tmp/pulp_db.backup"
  2. Stop all the services and Pulp: sudo systemctl disable --now pulpcore postgresql nginx redis
  3. Move the storage directory: sudo mv /var/lib/pulp/ pulp_storage && sudo chown -R 700:700 pulp_storage
  4. Move the config directory: sudo mv /etc/pulp settings && sudo chown -R 700:700 settings
  5. Move the postgresql data directory: sudo mv /var/lib/pgsql pgsql && sudo chown -R 26:26 pgsql
  6. Create the containers directory: mkdir containers
  7. Run the container, I would choose the 3.28 tag since it’s the lowest supported branch to your current version that should work.
podman run --detach \
             --publish 8080:80 \
             --name pulp \
             --volume "$(pwd)/settings":/etc/pulp:Z \
             --volume "$(pwd)/pulp_storage":/var/lib/pulp:Z \
             --volume "$(pwd)/pgsql":/var/lib/pgsql:Z \
             --volume "$(pwd)/containers":/var/lib/containers:Z \
             --device /dev/fuse \
             pulp/pulp:3.28

The multi-process container runs all the Pulp services, Nginx, Postgresql, and Redis. You can follow the logs with podman logs -f pulp and once it finishes starting up you should be able to curl the status endpoint.