aboutsummaryrefslogtreecommitdiff
path: root/kolla/image
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-01-17 17:08:45 +0000
committerGerrit Code Review <review@openstack.org>2019-01-17 17:08:45 +0000
commitffcda49e343aed666ee7839b5c7af04520577af0 (patch)
treebb8b9c17c7ae716a3edd3135d5bd782528ae7555 /kolla/image
parentaf8a4d75829350fae0e4d28538d5088306e55e14 (diff)
parent3410a6165af199992c0b06eaf603dd0dde72c4b0 (diff)
downloadkolla-ffcda49e343aed666ee7839b5c7af04520577af0.tar.gz
kolla-ffcda49e343aed666ee7839b5c7af04520577af0.zip
Merge "Add distro_python3 option"
Diffstat (limited to 'kolla/image')
-rwxr-xr-xkolla/image/build.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py
index 9ab3f68df..6cb1cb2da 100755
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -689,6 +689,14 @@ class KollaWorker(object):
deb_base = ['ubuntu', 'debian']
deb_type = ['source', 'binary']
+ if self.conf.distro_python3 is not None:
+ self.distro_python3 = self.conf.distro_python3
+ elif self.base in rh_base and self.base_tag in ['8']:
+ # RHEL 8+ is python3
+ self.distro_python3 = True
+ else:
+ self.distro_python3 = False
+
if not ((self.base in rh_base and self.install_type in rh_type) or
(self.base in deb_base and self.install_type in deb_type)):
raise exception.KollaMismatchBaseTypeException(
@@ -888,6 +896,7 @@ class KollaWorker(object):
'kolla_version': kolla_version,
'image_name': image_name,
'users': self.get_users(),
+ 'distro_python3': self.distro_python3,
'rpm_setup': self.rpm_setup,
'build_date': build_date}
env = jinja2.Environment( # nosec: not used to render HTML