Merge lp:~soren/nova/only-start-one-dnsmasq into lp:~hudson-openstack/nova/trunk
Status: | Merged |
---|---|
Approved by: | Vish Ishaya |
Approved revision: | 839 |
Merged at revision: | 842 |
Proposed branch: | lp:~soren/nova/only-start-one-dnsmasq |
Merge into: | lp:~hudson-openstack/nova/trunk |
Diff against target: |
10 lines (+1/-0) 1 file modified
nova/network/linux_net.py (+1/-0) |
To merge this branch: | bzr merge lp:~soren/nova/only-start-one-dnsmasq |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vish Ishaya (community) | Approve | ||
Matt Dietz (community) | Approve | ||
Review via email: mp+54169@code.launchpad.net |
Commit message
Wrap update_dhcp in utils.synchronized.
Description of the change
From the linked bug:
"When I reinstall my test environment and start running instances on it, usually only one of the first batch succeeds, the rest are stuck in "networking" state. After that everything is fine and I can run many concurrent RunInstances calls.
I'm not completely sure, but my working hypothesis is each thread finds that dnsmasq isn't running, and then tries to start it, all at roughly the same time. Only one succeeds, though, because only one process can listen on the socket at any given time."
The hypothesis held up, adding this lock has completely solved the problem.
This change is crucial for the automated integration tests to be integrated into the patch acceptance workflow. Without it, the first round of tests after a clean install will fail.
Makes sense to me.