From 57c16d0da23908a3aec2b234a92f6b6979f59daa Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 19 Aug 2022 11:37:42 +0100 Subject: [PATCH] mariadb: Fix 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. Additionally, for Victoria, this disables the monasca-grafana building on CentOS. Closes-Bug: #1988121 Change-Id: Ia094cd1e29232c47d1fb26e00de569677bc5b8a1 (cherry picked from commit 94fad9f26bc056e9f049ff63fde5ef163eae43dc) (cherry picked from commit b3e72210851a2a9e3e066a85bbb2341bb9fadba5) --- kolla/image/build.py | 12 +++++++++--- kolla/template/repos.yaml | 8 ++++---- releasenotes/notes/docker-6-6d77b5ff7ec1daef.yaml | 5 +++++ 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 releasenotes/notes/docker-6-6d77b5ff7ec1daef.yaml diff --git a/kolla/image/build.py b/kolla/image/build.py index efb11f9639..0a3ed999b5 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -127,6 +127,7 @@ class Status(Enum): 'centos': { "hacluster-pcs", # Missing crmsh package + "monasca-grafana", # Too old Ruby now and not supported well "nova-spicehtml5proxy", # Missing spicehtml5 package "ovsdpdk", # Not supported on CentOS "tgtd", # Not supported on CentOS 8 @@ -349,9 +350,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 c55cb699a7..de4561394a 100644 --- a/kolla/template/repos.yaml +++ b/kolla/template/repos.yaml @@ -54,7 +54,7 @@ debian: influxdb: "deb https://repos.influxdata.com/debian buster stable" logstash: "deb [arch=amd64] https://artifacts.elastic.co/packages/oss-6.x/apt stable main" kibana: "deb [arch=amd64] https://artifacts.elastic.co/packages/oss-6.x/apt stable main" - mariadb: "deb http://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/debian buster main" + mariadb: "deb https://dlm.mariadb.com/repo/mariadb-server/10.3/repo/debian buster main" rabbitmq: "deb https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/debian buster main" td-agent: "deb http://packages.treasuredata.com/4/debian/buster buster contrib" @@ -66,7 +66,7 @@ debian-aarch64: logstash: "deb [arch=amd64] https://artifacts.elastic.co/packages/oss-6.x/apt stable main" kibana: "deb [arch=amd64] https://artifacts.elastic.co/packages/oss-6.x/apt stable main" libvirt: "deb https://obs.linaro.org/repos/home:/marcin.juszkiewicz/debian-buster ./" - mariadb: "deb http://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/debian buster main" + mariadb: "deb https://dlm.mariadb.com/repo/mariadb-server/10.3/repo/debian buster main" rabbitmq: "deb https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/debian buster main" td-agent: "deb http://packages.treasuredata.com/4/debian/buster buster contrib" @@ -77,7 +77,7 @@ ubuntu: influxdb: "deb https://repos.influxdata.com/ubuntu focal stable" logstash: "deb https://artifacts.elastic.co/packages/oss-6.x/apt stable main" kibana: "deb https://artifacts.elastic.co/packages/oss-6.x/apt stable main" - mariadb: "deb http://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/ubuntu focal main" + mariadb: "deb https://dlm.mariadb.com/repo/mariadb-server/10.3/repo/ubuntu focal main" qdrouterd: "deb http://ppa.launchpad.net/qpid/released/ubuntu/ focal main" rabbitmq: "deb https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/ubuntu focal main" td-agent: "deb http://packages.treasuredata.com/4/ubuntu/focal/ focal contrib" @@ -88,7 +88,7 @@ ubuntu-aarch64: grafana: "deb https://packages.grafana.com/oss/deb stable main" influxdb: "deb https://repos.influxdata.com/ubuntu focal stable" logstash: "deb [arch=amd64] https://artifacts.elastic.co/packages/oss-6.x/apt stable main" - mariadb: "deb http://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/ubuntu bionic main" + mariadb: "deb https://dlm.mariadb.com/repo/mariadb-server/10.3/repo/ubuntu bionic main" rabbitmq: "deb https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/ubuntu focal main" td-agent: "deb http://packages.treasuredata.com/4/ubuntu/focal/ focal contrib" 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 `__