~serge-hallyn/ubuntu/quantal/lxc/lxc-user-ns

« back to all changes in this revision

Viewing changes to debian/patches/0088-ubuntu-template-flock

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2012-06-11 15:46:25 UTC
  • Revision ID: package-import@ubuntu.com-20120611154625-s5yxhd86bti3klv8
Tags: 0.8.0~rc1-4ubuntu13
* 0086-lxc-unshare-zero-args: fix lxc-unshare segfaulting when no command
  is given (LP: #1011603)
* 0087-lxc-ls-dash: fix lxc-ls for containers whose names start with a
  dash  (LP: #1006332)
* 0088-ubuntu-template-flock: don't fail when flock is busy, just wait,
  so concurrent lxc-creates don't break.  (LP: #1007483)
* 0089-lxc-netstat-exec: fix lxc-netstat errors (LP: #1011739)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
5
Forwarded: yes
 
6
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1007483
 
7
 
 
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
 
12
@@ -198,7 +198,7 @@
 
13
 {
 
14
     mkdir -p /var/lock/subsys/
 
15
     (
 
16
-       flock -n -x 200
 
17
+       flock -x 200
 
18
        if [ $? -ne 0 ]; then
 
19
            echo "Cache repository is busy."
 
20
            return 1
 
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
 
25
@@ -153,7 +153,7 @@
 
26
     rootfs=$1
 
27
     mkdir -p @LOCALSTATEDIR@/lock/subsys/
 
28
     (
 
29
-       flock -n -x 200
 
30
+       flock -x 200
 
31
        if [ $? -ne 0 ]; then
 
32
            echo "Cache repository is busy."
 
33
            return 1
 
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
 
38
@@ -190,7 +190,7 @@
 
39
 {
 
40
     mkdir -p /var/lock/subsys/
 
41
     (
 
42
-       flock -n -x 200
 
43
+       flock -x 200
 
44
        if [ $? -ne 0 ]; then
 
45
            echo "Cache repository is busy."
 
46
            return 1
 
47
@@ -281,7 +281,7 @@
 
48
 
 
49
     # lock, so we won't purge while someone is creating a repository
 
50
     (
 
51
-       flock -n -x 200
 
52
+       flock -x 200
 
53
        if [ $? != 0 ]; then
 
54
            echo "Cache repository is busy."
 
55
            exit 1
 
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
 
60
@@ -142,7 +142,7 @@
 
61
     rootfs=$1
 
62
     mkdir -p @LOCALSTATEDIR@/lock/subsys/
 
63
     (
 
64
-       flock -n -x 200
 
65
+       flock -x 200
 
66
        if [ $? -ne 0 ]; then
 
67
            echo "Cache repository is busy."
 
68
            return 1
 
69
@@ -225,7 +225,7 @@
 
70
 
 
71
     # lock, so we won't purge while someone is creating a repository
 
72
     (
 
73
-       flock -n -x 200
 
74
+       flock -x 200
 
75
        if [ $? != 0 ]; then
 
76
            echo "Cache repository is busy."
 
77
            exit 1
 
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
 
82
@@ -217,7 +217,7 @@
 
83
     rootfs=$1
 
84
     mkdir -p /var/lock/subsys/
 
85
     (
 
86
-       flock -n -x 200
 
87
+       flock -x 200
 
88
        if [ $? -ne 0 ]; then
 
89
            echo "Cache repository is busy."
 
90
            return 1
 
91
@@ -305,7 +305,7 @@
 
92
 
 
93
     # lock, so we won't purge while someone is creating a repository
 
94
     (
 
95
-       flock -n -x 200
 
96
+       flock -x 200
 
97
        if [ $? != 0 ]; then
 
98
            echo "Cache repository is busy."
 
99
            exit 1
 
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
 
104
@@ -294,7 +294,7 @@
 
105
 
 
106
 mkdir -p /var/lock/subsys/
 
107
 (
 
108
-    flock -n -x 200
 
109
+    flock -x 200
 
110
 
 
111
     cd $cache
 
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
 
117
@@ -229,7 +229,7 @@
 
118
     mkdir -p /var/lock/subsys/
 
119
 
 
120
     (
 
121
-        flock -n -x 200
 
122
+        flock -x 200
 
123
         if [ $? -ne 0 ]; then
 
124
             echo "Cache repository is busy."
 
125
             return 1