From 520147624478642a596056bf9ac3c6c9d361c4fb Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Fri, 6 Nov 2020 11:58:19 +0530 Subject: [PATCH] Map build host repos to distro.repos.d instead of yum.repos.d Currently, when building container images, we are overriding the ubi image repos with the repos configured in the host. Effectively, this is removing ubi repo config from the image build environment which most of the times is not a problem as centos is on sync with ubi, but in some cases as after RHEL 8.3 release, ubi is ahead of CentOS and need packages from the ubi repo itself. This patch is bind mounting the repos config from build host in distro.repos.d instead of yum.repos.d. In that way, both the repos configured by default in the image (ubi repos) and the ones in the host are available. Depends-On: https://review.opendev.org/c/openstack/tripleo-common/+/765078 Closes-Bug: #1902846 Change-Id: I55f4b8cf2ad971e196fbd06db743d07ce3135ea8 (cherry picked from commit a4fdf46d83a91e8cbe8f40abc79d94a1c31dc592) (cherry picked from commit 93e4fbde06eb6850517dc0817590a18cf41b91e5) --- .../tests/v1/container_image/test_tripleo_container_image.py | 2 +- tripleoclient/v1/tripleo_container_image.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tripleoclient/tests/v1/container_image/test_tripleo_container_image.py b/tripleoclient/tests/v1/container_image/test_tripleo_container_image.py index 206a03358..4ac09ee4f 100644 --- a/tripleoclient/tests/v1/container_image/test_tripleo_container_image.py +++ b/tripleoclient/tests/v1/container_image/test_tripleo_container_image.py @@ -180,7 +180,7 @@ class TestContainerImages(deploy_fakes.TestDeployOvercloud): ( "volumes", [ - "/etc/yum.repos.d:/etc/yum.repos.d:z", + "/etc/yum.repos.d:/etc/distro.repos.d:z", "/etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z", "bind/mount", ], diff --git a/tripleoclient/v1/tripleo_container_image.py b/tripleoclient/v1/tripleo_container_image.py index 000f30ada..7160528b3 100644 --- a/tripleoclient/v1/tripleo_container_image.py +++ b/tripleoclient/v1/tripleo_container_image.py @@ -189,7 +189,7 @@ class Build(command.Command): dest="volumes", metavar="", default=[ - "/etc/yum.repos.d:/etc/yum.repos.d:z", + "/etc/yum.repos.d:/etc/distro.repos.d:z", "/etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z", ], action="append",