-
Notifications
You must be signed in to change notification settings - Fork 0
/
exercise.sh
48 lines (30 loc) · 1.15 KB
/
exercise.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Make the bug happen.
# get our tunnel ip.
export FLEETCTL_TUNNEL=$(gcloud compute instances list --regex ci8-host-a --format json | sed -n '/"natIP":/ s/.*[^0-9.]\([0-9.]\+\)[^0-9.].*/\1/p')
fleetctl list-units
cp issue8@.service-before issue8@.service
fleetctl submit issue8@.service other-helper@.service
fleetctl load issue8@{1..5}.service
fleetctl load other-helper@{1..5}.service
fleetctl start issue8@{1..5}.service
echo "Just launched:"
fleetctl list-units
# Those services (artificially) take 15 seconds to start.
sleep 20
echo "Should all be running:"
fleetctl list-units
# Upload an altered issue8 service file
cp issue8@.service-after issue8@.service
fleetctl --debug destroy issue8@.service
fleetctl --debug submit issue8@.service
# Rolling upgrade:
for ((id=1; id<=5; id++)); do
fleetctl --debug destroy issue8@$id.service
fleetctl --debug load issue8@$id.service
fleetctl --debug start issue8@$id.service
sleep 10
done
echo "Should all be updated, and either running or in start-pre"
fleetctl --debug list-units
# But the other-helper's are all dead, because "No such file or directory".
fleetctl --debug status other-helper@1.service