tripleo-heat-templates/deployment/podman
Cédric Jeanneret 215d918651 Workaround for subscription-manager
Since we're bind-mounting /run within containers, we have an unwanted
/run/.containerenv file exposed on the host.

subscription-manager checks for that file[1] in order to know whether
it's running within a container or not.

With dnf "subscription-manager" plugin, we are facing a major issue,
where the repository list is updated.

While it's not that a big issue if using Red Hat CDN, it is actually
really bad when we're using a Satellite instance: all the repo list
are updated to point to some non-existing path on the CDN, leading
to a broken deploy, usually at step_4, when the deployment wants to
install net-snmp (it's already present, but dnf will fail while
trying to update its repository and failing to get the repomd.xml).

This patch takes advantage of a block in the rhsm.py nested in
subscription-manager[2] in order to ensure it will be using the correct
rhsm.conf, and stop defaulting on the CDN.

It shouldn't make any difference with a non-Satellite deployment.

As a final note, this repository override is a new feature in
subscription-manager, shipped on el9. We'll therefore need to backport
this patch down to Wallaby, in order to get it in osp-17 cycle.

[1] 385d64843a/src/rhsm/config.py (L102-L127)
[2] 385d64843a/src/rhsm/config.py (L384-L387)

Change-Id: Ia66fb6933b8e7b8289e80fab5508c7ed7f828f01
Resolves: rhbz#2075080
Related: rhbz#2058540
2022-06-10 13:25:15 +00:00
..
podman-baremetal-ansible.yaml Workaround for subscription-manager 2022-06-10 13:25:15 +00:00