From 68fc72cd5d5003025da53cd1160e9cd19367cb10 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 22 Apr 2021 11:28:34 +0200 Subject: base: check for compatible distro using just sh We allow users to use own image as base one and then we check is it proper distribution version one. And this check is done in different way for CentOS and different for Debian/Ubuntu systems. This patchset uses PRETTY_NAME from /etc/os-release for check. And it is done before anything gets installed so if wrong distribution is used then build process breaks as soon as possible. Change-Id: I22db3cd4cb608332261824626e3b8768821b8dd0 --- kolla/common/config.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'kolla/common') diff --git a/kolla/common/config.py b/kolla/common/config.py index 23e5ead40..9e56a1ee2 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -27,11 +27,12 @@ DEFAULT_BASE_TAGS = { 'debian': {'name': 'debian', 'tag': 'bullseye'}, 'ubuntu': {'name': 'ubuntu', 'tag': '20.04'}, } -DISTRO_RELEASE = { - 'centos': '8', - 'rhel': '8', - 'debian': 'testing/unstable', - 'ubuntu': '20.04', +# NOTE(hrw): has to match PRETTY_NAME in /etc/os-release +DISTRO_PRETTY_NAME = { + 'centos': 'CentOS Stream 8', + 'rhel': 'Red Hat Enterprise Linux 8', + 'debian': 'Debian GNU/Linux bullseye', + 'ubuntu': 'Ubuntu 20.04', } OPENSTACK_RELEASE = 'wallaby' -- cgit v1.2.3