Relax needs_delete() filter
Don't remove a container when all these conditions are met:
- the container is part of the config_id
- the container is running
- the container isn't in the tripleo_container_manage_config path.
The reason is, we'll let operators to deploy containers individually, so
we don't want to touch other containers not in the config at that time.
Example: as an operator I want to apply ansible on haproxy
(config_step1); so I don't want other containers from config_step1 to be
removed.
This code was here to cleanup containers not part of the config (e.g. if
you upgrade and a container isn't used anymore); but it's too agressive.
If a container isn't needed anymore, it'll need to be handled during the
upgrade steps.
Change-Id: I3103f642ba86111e02d06922876b5f1ac78df602
(cherry picked from commit 94d52bc00f
)
This commit is contained in:
parent
26f551edd2
commit
d71a54294d
|
@ -109,13 +109,6 @@ class FilterModule(object):
|
|||
to_delete += [c_name]
|
||||
continue
|
||||
|
||||
# Remove containers managed by tripleo-ansible that aren't in
|
||||
# config e.g. containers not needed anymore and removed by an
|
||||
# upgrade. Note: we don't cleanup paunch-managed containers.
|
||||
if c_name not in config:
|
||||
to_delete += [c_name]
|
||||
continue
|
||||
|
||||
for c_name, config_data in config.items():
|
||||
# don't try to remove a container which doesn't exist
|
||||
if c_name not in installed_containers:
|
||||
|
|
Loading…
Reference in New Issue