]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Enhance utils.ensure_dir to be resilient to concurrent workers
authorCarl Baldwin <carl.baldwin@hp.com>
Wed, 3 Jun 2015 16:56:23 +0000 (16:56 +0000)
committerCarl Baldwin <carl.baldwin@hp.com>
Wed, 3 Jun 2015 16:56:23 +0000 (16:56 +0000)
commit75c3a8dee4a7f643d7654e2ea4641fd1bd18af62
treefce0c3dc9251fd6ba58f1ad0f9dda8be2c401e61
parent2fcbbf3031fe1d326ddb2b9bb1b06e0e39422022
Enhance utils.ensure_dir to be resilient to concurrent workers

In rare cases, concurrent workers may attempt to ensure a directory
exists.  One may successfully create the directory while the other
gets an oserror that it already exists.  This patch detects the
problem and returns successfully in both cases.

Change-Id: I224be69168ede8a496a5f7d59b04b722f4de7192
neutron/agent/linux/utils.py
neutron/tests/fullstack/fullstack_fixtures.py
neutron/tests/unit/agent/linux/test_utils.py