@@ -16,17 +16,6 @@ cat << EOF
16
16
force the delete of the lease, or view the current lease.
17
17
It exits with a non-zero value on a failure.
18
18
19
- Warnings:
20
-
21
- This is a 'best effort' script -- it still has potential race
22
- conditions. They should be pretty rare, but don't bet the farm on
23
- them not happening!
24
-
25
- This script requires cooperation among all users of the k8s cluster that
26
- need exclusive access - they all must use the script. The script
27
- doesn't directly grant exclusive access, it just can be used to make sure
28
- that no other callers of the same script have the lease.
29
-
30
19
Usage:
31
20
32
21
Obtain : lease.sh -o id [-t timeout]
@@ -45,8 +34,8 @@ cat << EOF
45
34
while trying to get the lease (tunable via -t), and will grab
46
35
the lease if no other process owns it or no other process has touched
47
36
it for a period of 10 minutes. 'id' should be some unique
48
- string suitable for use as a filename - a pid is sufficient
49
- or a ` uuidgen ` value .
37
+ string suitable for use as a filename - a uuid is preferred but a
38
+ pid is usually sufficient .
50
39
51
40
2) While running, call 'lease.sh -r id' every few minutes
52
41
to renew the lease and retain ownership. Fail if this fails,
@@ -68,6 +57,18 @@ cat << EOF
68
57
'lease.sh -f' or 'kubectl delete cm acceptance-test-lease -n default'.
69
58
This should only be done if you're sure there's
70
59
no current processe that owns the lease.
60
+
61
+ Warnings:
62
+
63
+ This is a 'best effort' script -- it still has potential race
64
+ conditions. They should be pretty rare, but don't bet the farm on
65
+ them not happening!
66
+
67
+ This script requires cooperation among all users of the k8s cluster that
68
+ need exclusive access - they all must use the script. The script
69
+ doesn't directly grant exclusive access, it just can be used to make sure
70
+ that no other callers of the same script have the lease.
71
+
71
72
72
73
Internals:
73
74
0 commit comments