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/763203
Closes-Bug: #1902846
Change-Id: I55f4b8cf2ad971e196fbd06db743d07ce3135ea8
This commit is contained in:
yatinkarel 2020-11-06 11:58:19 +05:30 committed by yatin
parent bec4e6fcb1
commit a4fdf46d83
2 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,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",
],

View File

@ -181,7 +181,7 @@ class Build(command.Command):
dest="volumes",
metavar="<volume-path>",
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",