Browse Source

Merge "Remove only non-alive agents during migration"

Zuul 3 months ago
parent
commit
e189342bac

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

@@ -4,8 +4,8 @@ set -x
4 4
 
5 5
 source {{ overcloudrc }}
6 6
 
7
-# Delete neutron agents
8
-for i in `openstack network agent list | grep neutron- | awk {'print $2'}`
7
+# Delete non alive neutron agents
8
+for i in `openstack network agent list | grep neutron- | grep -v ':-)' | awk {'print $2'}`
9 9
 do
10 10
   openstack network agent delete $i
11 11
 done

+ 5
- 0
migration/tripleo_environment/playbooks/roles/migration/tasks/cleanup-dataplane.yml View File

@@ -36,6 +36,11 @@
36 36
 
37 37
 - name: Cleanup neutron datapath resources
38 38
   shell: |
39
+    # avoid cleaning up dhcp namespaces if the neutron dhcp agent is up (SR-IOV use case)
40
+    if [[ "{{ item.value.cleanup_type }}" == "dhcp" ]]; then
41
+        docker inspect neutron_dhcp && echo "Shouldn't clean DHCP namespaces if neutron_dhcp docker is up" && exit 0
42
+    fi
43
+
39 44
     if ip netns | egrep -e "{{ item.value.netns_regex }}"
40 45
     then
41 46
       echo "Cleaning up"

Loading…
Cancel
Save