Fix neutron resource cleanup after ml2/ovs migration

The migration script "delete-neutron-resources" was being
executed on controller-0 instead of the undercloud node regardless
of the defer_to:localhost ansible setting.

In that controller ~/overcloudrc does not exist, so the cleanup
was failing silently.

This commit moves the cleanup to a separate role that we tie
to localhost (undercloud) from ovn-migration.yml

Closes-Bug: #1804194

Change-Id: I05f2411604ba01d170440ac655491a624f98aafc
changes/83/618983/1
Miguel Angel Ajo 4 years ago
parent 8798518263
commit 4ea6513398
  1. 1
      migration/tripleo_environment/playbooks/ovn-migration.yml
  2. 3
      migration/tripleo_environment/playbooks/roles/delete-neutron-resources/defaults/main.yml
  3. 0
      migration/tripleo_environment/playbooks/roles/delete-neutron-resources/tasks/main.yml
  4. 0
      migration/tripleo_environment/playbooks/roles/delete-neutron-resources/templates/delete-neutron-resources.sh.j2
  5. 2
      migration/tripleo_environment/playbooks/roles/migration/defaults/main.yml
  6. 6
      migration/tripleo_environment/playbooks/roles/migration/tasks/main.yml

@ -65,6 +65,7 @@
- name: Post migration
hosts: localhost
roles:
- delete-neutron-resources
- post-migration
tags:
- post-migration

@ -0,0 +1,3 @@
---
ovn_migration_temp_dir_del: "{{ working_dir }}/delete_neutron_resources"

@ -10,6 +10,6 @@ agent_cleanups:
config: --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-dhcp-agent --log-file=/var/log/neutron/netns-cleanup-dhcp.log
cleanup_type: dhcp
netns_regex: "qdhcp-"
ovn_migration_temp_dir_del: "{{ working_dir }}/delete_neutron_resources"
tunnel_bridge: "br-tun"
ovn_bridge: "br-int"

@ -10,9 +10,3 @@
when: ovn_controller is defined
tags:
- cleanup-dataplane
- include_tasks: delete-neutron-resources.yml
delegate_to: localhost
when: ovn_central is defined
tags:
- cleanup-neutron-resources

Loading…
Cancel
Save