undercloud deploy, delete heat containers

Currently the containerised undercloud deploy leaves behind the
stopped containers used to run db_sync and getent. This change
specifies docker run --rm so that these containers are removed when
they exit.

Change-Id: Ia1615cc6280e193fb17eb612ab874d3593bb06be
This commit is contained in:
Steve Baker 2017-03-03 15:18:03 +13:00
parent f90b59d0d5
commit 2d6218d65a
1 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ class HeatDockerLauncher(HeatBaseLauncher):
def heat_db_sync(self):
subprocess.check_call([
'docker', 'run',
'docker', 'run', '--rm',
'--user', self.user,
'--volume', '%(conf)s:/etc/heat/heat.conf' % {'conf':
self.config_file},
@ -132,7 +132,7 @@ class HeatDockerLauncher(HeatBaseLauncher):
def get_heat_uid(self):
p = subprocess.Popen([
'docker', 'run',
'docker', 'run', '--rm',
self.container_image,
'getent', 'passwd', '|', 'grep', self.user],
stdout=subprocess.PIPE)
@ -140,7 +140,7 @@ class HeatDockerLauncher(HeatBaseLauncher):
def get_heat_gid(self):
p = subprocess.Popen([
'docker', 'run',
'docker', 'run', '--rm',
self.container_image,
'getent', 'group', '|', 'grep', self.user],
stdout=subprocess.PIPE)