]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Make pid file locking non-blocking
authorRyan Moe <rmoe@mirantis.com>
Fri, 2 May 2014 20:08:45 +0000 (13:08 -0700)
committerRyan Moe <rmoe@mirantis.com>
Wed, 21 May 2014 20:29:01 +0000 (13:29 -0700)
commit797fa55fef2e28cce9dd8f06009217e57bb31e91
tree919f0de104e39c4dab35c5683818449e3fa18e60
parent52dc25bf418e201b9a237569bfd7f2a8fcdf2623
Make pid file locking non-blocking

fcntl.flock will block indefinitely if another process holds an exclusive
lock. A non-blocking flock operation will raise an error when a lock already
exists so we can fail immediately.

Closes-bug: 1315507
Change-Id: Icf97b1f8643157719b3d28ac2c0c1576a5069697
neutron/agent/linux/daemon.py
neutron/tests/unit/test_linux_daemon.py