]> xenbits.xensource.com Git - libvirt.git/commit
Retry veth device creation on failure
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 2 Oct 2013 11:18:49 +0000 (12:18 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 3 Oct 2013 10:28:30 +0000 (11:28 +0100)
commitf2e53555eb6971635e526e93f9de07a76daf61cb
tree47e3b19255546ee12148e8484e549b4e9918f2b8
parent8766e9b5a56109155b5c952af91d384d7e0555ec
Retry veth device creation on failure

The veth device creation code run in two steps, first it looks
for two free veth device names, then it runs ip link to create
the veth pair. There is an obvious race between finding free
names and creating them, when guests are started in parallel.

Rewrite the code to loop and re-try creation if it fails, to
deal with the race condition.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/virnetdevveth.c