Add kolla version to base container

We want to record kolla version of running containers to be able to
detect whether or not we need to perform certain downtime-causing
actions during upgrade.

Change-Id: Ie113029da98303e6809d56edbf6d8de37be128d7
Implements: blueprint record-version
This commit is contained in:
Michal Jastrzebski 2015-12-16 10:49:46 -06:00 committed by Michal Rostecki
parent 03fd08d867
commit 9cd603dfde
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,8 @@
FROM {{ base_distro }}:{{ base_distro_tag }}
MAINTAINER {{ maintainer }}
LABEL kolla_version="{{ kolla_version }}"
{# Early failure for bases and types #}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
{% if install_type not in ['source', 'binary', 'rdo', 'rhel'] %}

View File

@ -434,7 +434,8 @@ class KollaWorker(object):
'install_type': self.install_type,
'namespace': self.namespace,
'tag': self.tag,
'maintainer': self.maintainer}
'maintainer': self.maintainer,
'kolla_version': get_kolla_version()}
if self.include_header:
with open(self.include_header, 'r') as f:
values['include_header'] = f.read()