1
Description: templates: don't fail on busy flock
2
Just wait until the lock is available. That is a nicer behavior
3
for concurrent lxc-creates.
4
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
6
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1007483
8
Index: lxc-0.8.0~rc1/templates/lxc-altlinux.in
9
===================================================================
10
--- lxc-0.8.0~rc1.orig/templates/lxc-altlinux.in 2012-03-01 21:42:19.000000000 +0000
11
+++ lxc-0.8.0~rc1/templates/lxc-altlinux.in 2012-06-11 16:13:33.057526360 +0000
14
mkdir -p /var/lock/subsys/
19
echo "Cache repository is busy."
21
Index: lxc-0.8.0~rc1/templates/lxc-debian.in
22
===================================================================
23
--- lxc-0.8.0~rc1.orig/templates/lxc-debian.in 2012-06-11 15:13:42.000000000 +0000
24
+++ lxc-0.8.0~rc1/templates/lxc-debian.in 2012-06-11 16:13:41.093526201 +0000
27
mkdir -p @LOCALSTATEDIR@/lock/subsys/
32
echo "Cache repository is busy."
34
Index: lxc-0.8.0~rc1/templates/lxc-fedora.in
35
===================================================================
36
--- lxc-0.8.0~rc1.orig/templates/lxc-fedora.in 2012-06-11 15:13:42.000000000 +0000
37
+++ lxc-0.8.0~rc1/templates/lxc-fedora.in 2012-06-11 16:13:48.873526476 +0000
40
mkdir -p /var/lock/subsys/
45
echo "Cache repository is busy."
49
# lock, so we won't purge while someone is creating a repository
54
echo "Cache repository is busy."
56
Index: lxc-0.8.0~rc1/templates/lxc-lenny.in
57
===================================================================
58
--- lxc-0.8.0~rc1.orig/templates/lxc-lenny.in 2012-06-11 15:13:42.000000000 +0000
59
+++ lxc-0.8.0~rc1/templates/lxc-lenny.in 2012-06-11 16:13:56.801534092 +0000
62
mkdir -p @LOCALSTATEDIR@/lock/subsys/
67
echo "Cache repository is busy."
71
# lock, so we won't purge while someone is creating a repository
76
echo "Cache repository is busy."
78
Index: lxc-0.8.0~rc1/templates/lxc-opensuse.in
79
===================================================================
80
--- lxc-0.8.0~rc1.orig/templates/lxc-opensuse.in 2012-06-11 15:13:42.000000000 +0000
81
+++ lxc-0.8.0~rc1/templates/lxc-opensuse.in 2012-06-11 16:14:02.077525043 +0000
84
mkdir -p /var/lock/subsys/
89
echo "Cache repository is busy."
93
# lock, so we won't purge while someone is creating a repository
98
echo "Cache repository is busy."
100
Index: lxc-0.8.0~rc1/templates/lxc-ubuntu-cloud.in
101
===================================================================
102
--- lxc-0.8.0~rc1.orig/templates/lxc-ubuntu-cloud.in 2012-06-11 15:13:42.000000000 +0000
103
+++ lxc-0.8.0~rc1/templates/lxc-ubuntu-cloud.in 2012-06-11 16:12:51.481524346 +0000
106
mkdir -p /var/lock/subsys/
112
if [ $flushcache -eq 1 ]; then
113
Index: lxc-0.8.0~rc1/templates/lxc-ubuntu.in
114
===================================================================
115
--- lxc-0.8.0~rc1.orig/templates/lxc-ubuntu.in 2012-06-11 15:13:42.000000000 +0000
116
+++ lxc-0.8.0~rc1/templates/lxc-ubuntu.in 2012-06-11 16:12:37.029527081 +0000
118
mkdir -p /var/lock/subsys/
123
if [ $? -ne 0 ]; then
124
echo "Cache repository is busy."