Fix dhcp-agent-list-hosting-net race condition
Restart the neutron-dhcp-agent prior to running the dhcp-agent-list-hosting-net command. This will ensure that (assuming everything is working), the dhcp-agent shows the hosting-net output appropriately. Additionally, we should retry the "ip netns ls" command until "qdhcp" is available, this can take some time and may cause further race conditions. Change-Id: I585f8c0752b9145c8441a25434769155c99ac00b Closes-Bug: #1629346
This commit is contained in:
parent
d8ca8cb539
commit
29f02c1a9e
@ -86,6 +86,14 @@
|
||||
retries: 10
|
||||
delay: 3
|
||||
|
||||
# (andymccr): To avoid a race condition we can restart
|
||||
# the neutron-dhcp-agent service:
|
||||
# https://bugs.launchpad.net/openstack-ansible/+bug/1629346
|
||||
- name: Restart neutron-dhcp-agent service
|
||||
service:
|
||||
state: restarted
|
||||
name: neutron-dhcp-agent
|
||||
|
||||
- name: Ensure the dhcp agent is on the net
|
||||
shell: |
|
||||
. /root/openrc
|
||||
@ -98,6 +106,9 @@
|
||||
- name: Check for dhcp network namespace
|
||||
shell: ip netns ls
|
||||
register: dhcp_namespace
|
||||
until: dhcp_namespace.stdout.find("qdhcp") != -1
|
||||
retries: 5
|
||||
delay: 10
|
||||
|
||||
- name: List the namespaces
|
||||
debug:
|
||||
|
Loading…
x
Reference in New Issue
Block a user