Fix neutron agent container removal
This change fixes the removal of neutron agent containers so that it no longer relies on the containers existing on the deploy host. The file `leapfrog_remove_remaining_old_containers` is only created on the deploy host, when combined with the fact that the original task couldn't fail, it resulted in the removal of the containers silently failing on multi-node builds. This change gets the list of containers from the file on the deploy host before trying to delete them on all hosts. Change-Id: Ic95187fd7e7ff93c796ce01f296cb06a16ba72bd
This commit is contained in:
parent
56e888a375
commit
b291961361
@ -13,17 +13,22 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Remove the reminent neutron agent containers
|
- name: Remove the remnant neutron agent containers
|
||||||
hosts: "hosts"
|
hosts: "hosts"
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
user: root
|
user: root
|
||||||
tasks:
|
tasks:
|
||||||
- name: Search for old containers not yet deleted
|
- name: Get list of old containers
|
||||||
shell: >-
|
command: "cat /etc/openstack_deploy/leapfrog_remove_remaining_old_containers"
|
||||||
while read line; do lxc-destroy -fn $line; done < /etc/openstack_deploy/leapfrog_remove_remaining_old_containers
|
run_once: true
|
||||||
failed_when: false
|
delegate_to: localhost
|
||||||
args:
|
register: old_containers
|
||||||
executable: /bin/bash
|
|
||||||
|
- name: Destroy old containers
|
||||||
|
command: "lxc-destroy -fn {{ item }}"
|
||||||
|
with_items: old_containers.stdout_lines
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
# TODO: Improve l2 convergence too.
|
# TODO: Improve l2 convergence too.
|
||||||
- name: Remove the reminent neutron agent containers
|
- name: Remove the reminent neutron agent containers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user