From bf4341973401a3b6ba3e6a9ac20f0c310b425883 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 19 Aug 2022 11:37:42 +0100 Subject: [PATCH] mariadb: Fix RPM repository URLs The MariaDB project changed the location of the repositories, and the old URLs no longer work. Fix added for stable branches: Wrap version detection for docker module since it can fail for docker >= 6.0. Closes-Bug: #1988121 Change-Id: Ia094cd1e29232c47d1fb26e00de569677bc5b8a1 (cherry picked from commit 94fad9f26bc056e9f049ff63fde5ef163eae43dc) (cherry picked from commit b3e72210851a2a9e3e066a85bbb2341bb9fadba5) --- docker/base/mariadb-aarch64.repo | 6 +++--- docker/base/mariadb.repo | 6 +++--- kolla/image/build.py | 11 ++++++++--- kolla/template/repos.yaml | 8 ++++---- releasenotes/notes/docker-6-6d77b5ff7ec1daef.yaml | 5 +++++ 5 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 releasenotes/notes/docker-6-6d77b5ff7ec1daef.yaml diff --git a/docker/base/mariadb-aarch64.repo b/docker/base/mariadb-aarch64.repo index 7f7a1c8b1b..e95adc0323 100644 --- a/docker/base/mariadb-aarch64.repo +++ b/docker/base/mariadb-aarch64.repo @@ -1,6 +1,6 @@ [mariadb] -name = MariaDB -baseurl = https://downloads.mariadb.com/MariaDB/mariadb-10.5/yum/centos8-aarch64 -module_hotfixes = 1 +name = MariaDB Server +baseurl = https://dlm.mariadb.com/repo/mariadb-server/10.5/yum/rhel/8/aarch64 gpgcheck = 1 enabled = 0 +module_hotfixes = 1 diff --git a/docker/base/mariadb.repo b/docker/base/mariadb.repo index 9fbdd12ee0..0eeae084b6 100644 --- a/docker/base/mariadb.repo +++ b/docker/base/mariadb.repo @@ -1,6 +1,6 @@ [mariadb] -name = MariaDB -baseurl = https://downloads.mariadb.com/MariaDB/mariadb-10.5/yum/centos8-amd64 -module_hotfixes = 1 +name = MariaDB Server +baseurl = https://dlm.mariadb.com/repo/mariadb-server/10.5/yum/rhel/8/x86_64 gpgcheck = 1 enabled = 0 +module_hotfixes = 1 diff --git a/kolla/image/build.py b/kolla/image/build.py index 45383535d6..15dcab3887 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -310,9 +310,14 @@ def push_image(self, image): # Since docker 3.0.0, the argument of 'insecure_registry' is removed. # To be compatible, set 'insecure_registry=True' for old releases. - dc_running_ver = StrictVersion(docker.version) - if dc_running_ver < StrictVersion('3.0.0'): - kwargs['insecure_registry'] = True + # NOTE(frickler): The version check will fail for docker >= 6.0, but + # in that case we know that the workaround isn't needed. + try: + dc_running_ver = StrictVersion(docker.version) + if dc_running_ver < StrictVersion('3.0.0'): + kwargs['insecure_registry'] = True + except TypeError: + pass for response in self.dc.push(image.canonical_name, **kwargs): if 'stream' in response: diff --git a/kolla/template/repos.yaml b/kolla/template/repos.yaml index b75f13038d..bd1358e95c 100644 --- a/kolla/template/repos.yaml +++ b/kolla/template/repos.yaml @@ -74,7 +74,7 @@ debian: component: "main" gpg_key: "elasticsearch.asc" mariadb: - url: "http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/debian" + url: "https://dlm.mariadb.com/repo/mariadb-server/10.5/repo/debian" suite: "bullseye" component: "main" gpg_key: "mariadb.gpg" @@ -126,7 +126,7 @@ debian-aarch64: component: "main" gpg_key: "elasticsearch.asc" mariadb: - url: "http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/debian" + url: "https://dlm.mariadb.com/repo/mariadb-server/10.5/repo/debian" suite: "bullseye" component: "main" gpg_key: "mariadb.gpg" @@ -183,7 +183,7 @@ ubuntu: component: "main" gpg_key: "elasticsearch.asc" mariadb: - url: "http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu" + url: "https://dlm.mariadb.com/repo/mariadb-server/10.5/repo/ubuntu" suite: "focal" component: "main" gpg_key: "mariadb.gpg" @@ -235,7 +235,7 @@ ubuntu-aarch64: component: "main" gpg_key: "elasticsearch.asc" mariadb: - url: "http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu" + url: "https://dlm.mariadb.com/repo/mariadb-server/10.5/repo/ubuntu" suite: "focal" component: "main" gpg_key: "mariadb.gpg" diff --git a/releasenotes/notes/docker-6-6d77b5ff7ec1daef.yaml b/releasenotes/notes/docker-6-6d77b5ff7ec1daef.yaml new file mode 100644 index 0000000000..f666813255 --- /dev/null +++ b/releasenotes/notes/docker-6-6d77b5ff7ec1daef.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes problems when running with docker-py >=6. + `LP#1988121 `__