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:
parent
f90b59d0d5
commit
2d6218d65a
@ -121,7 +121,7 @@ class HeatDockerLauncher(HeatBaseLauncher):
|
|||||||
def heat_db_sync(self):
|
def heat_db_sync(self):
|
||||||
|
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
'docker', 'run',
|
'docker', 'run', '--rm',
|
||||||
'--user', self.user,
|
'--user', self.user,
|
||||||
'--volume', '%(conf)s:/etc/heat/heat.conf' % {'conf':
|
'--volume', '%(conf)s:/etc/heat/heat.conf' % {'conf':
|
||||||
self.config_file},
|
self.config_file},
|
||||||
@ -132,7 +132,7 @@ class HeatDockerLauncher(HeatBaseLauncher):
|
|||||||
|
|
||||||
def get_heat_uid(self):
|
def get_heat_uid(self):
|
||||||
p = subprocess.Popen([
|
p = subprocess.Popen([
|
||||||
'docker', 'run',
|
'docker', 'run', '--rm',
|
||||||
self.container_image,
|
self.container_image,
|
||||||
'getent', 'passwd', '|', 'grep', self.user],
|
'getent', 'passwd', '|', 'grep', self.user],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
@ -140,7 +140,7 @@ class HeatDockerLauncher(HeatBaseLauncher):
|
|||||||
|
|
||||||
def get_heat_gid(self):
|
def get_heat_gid(self):
|
||||||
p = subprocess.Popen([
|
p = subprocess.Popen([
|
||||||
'docker', 'run',
|
'docker', 'run', '--rm',
|
||||||
self.container_image,
|
self.container_image,
|
||||||
'getent', 'group', '|', 'grep', self.user],
|
'getent', 'group', '|', 'grep', self.user],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
|
Loading…
Reference in New Issue
Block a user