Browse Source

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
Miguel Angel Ajo 5 months ago
parent
commit
4ea6513398

+ 1
- 0
migration/tripleo_environment/playbooks/ovn-migration.yml View File

@@ -65,6 +65,7 @@
65 65
 - name: Post migration
66 66
   hosts: localhost
67 67
   roles:
68
+    - delete-neutron-resources
68 69
     - post-migration
69 70
   tags:
70 71
     - post-migration

+ 3
- 0
migration/tripleo_environment/playbooks/roles/delete-neutron-resources/defaults/main.yml View File

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

migration/tripleo_environment/playbooks/roles/migration/tasks/delete-neutron-resources.yml → migration/tripleo_environment/playbooks/roles/delete-neutron-resources/tasks/main.yml View File


migration/tripleo_environment/playbooks/roles/migration/templates/delete-neutron-resources.sh.j2 → migration/tripleo_environment/playbooks/roles/delete-neutron-resources/templates/delete-neutron-resources.sh.j2 View File


+ 1
- 1
migration/tripleo_environment/playbooks/roles/migration/defaults/main.yml View File

@@ -10,6 +10,6 @@ agent_cleanups:
10 10
     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
11 11
     cleanup_type: dhcp
12 12
     netns_regex: "qdhcp-"
13
-ovn_migration_temp_dir_del: "{{ working_dir }}/delete_neutron_resources"
13
+
14 14
 tunnel_bridge: "br-tun"
15 15
 ovn_bridge: "br-int"

+ 0
- 6
migration/tripleo_environment/playbooks/roles/migration/tasks/main.yml View File

@@ -10,9 +10,3 @@
10 10
   when: ovn_controller is defined
11 11
   tags:
12 12
     - cleanup-dataplane
13
-
14
-- include_tasks: delete-neutron-resources.yml
15
-  delegate_to: localhost
16
-  when: ovn_central is defined
17
-  tags:
18
-    - cleanup-neutron-resources

Loading…
Cancel
Save