Do not delete containers named rpc.*

If leapfrogging from Kilo (and above) with a host named rpc.*
all the containers will be wiped during the step
``neutron-remove-old-containers.yml``.

Change-Id: I2e1106bcce12547d6ab9e0384cd96d5e0194001d
This commit is contained in:
Jean-Philippe Evrard 2017-07-10 16:20:36 +00:00
parent 8a182302ee
commit c441ba4410
2 changed files with 3 additions and 2 deletions

View File

@ -36,6 +36,7 @@ pushd ${MAIN_PATH}/playbooks
REMOVED_CONTAINERS+="$(get_inv_items 'neutron_agent' | awk '{print $2}') "
for i in ${REMOVED_CONTAINERS};do
echo "$i" >> /etc/openstack_deploy/leapfrog_remove_remaining_old_containers
remove_inv_items $i
done

View File

@ -18,9 +18,9 @@
gather_facts: false
user: root
tasks:
- name: Search for and destroy reminent RPC grouped containers
- name: Search for old containers not yet deleted
shell: >-
lxc-ls -f | awk '/rpc/ {print $1}' | xargs -n 1 lxc-destroy -fn
while read line; do lxc-destroy -fn $line; done < /etc/openstack_deploy/leapfrog_remove_remaining_old_containers
failed_when: false
args:
executable: /bin/bash