forked from weaveworks/ignite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lockfile at snapshot activation to avoid race condition
This creates an ignite lock file at /tmp/ignite-snapshot.lock when an overlay snapshot is created. The locking is handled via pid file using github.com/nightlyone/lockfile package. This helps avoid the race condition when multiple ignite processes try to create loop device and use the device mapper for overlay snapshot at the same time. When a process obtains a lock, other processes retry to obtain a lock, until a lock is obtained. Once the snapshot is activated, the lock is released.
- Loading branch information
1 parent
edfdea7
commit 9a99293
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters