blob: 710edab73757fa44a16fd9136c66ae8bf3b31299 (
plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
|
tasks:
- vip:
# make sure cephadm notices the new IP
- cephadm.shell:
host.a:
- ceph orch device ls --refresh
# deploy rgw + ingress
- cephadm.apply:
specs:
- service_type: rgw
service_id: foo
placement:
count: 4
host_pattern: "*"
spec:
rgw_frontend_port: 8000
- service_type: ingress
service_id: rgw.foo
placement:
count: 2
spec:
backend_service: rgw.foo
frontend_port: 9000
monitor_port: 9001
virtual_ip: "{{VIP0}}/{{VIPPREFIXLEN}}"
- cephadm.wait_for_service:
service: rgw.foo
- cephadm.wait_for_service:
service: ingress.rgw.foo
# take each component down in turn and ensure things still work
- cephadm.shell:
host.a:
- |
echo "Check while healthy..."
curl http://{{VIP0}}:9000/
# stop each rgw in turn
echo "Check with each rgw stopped in turn..."
for rgw in `ceph orch ps | grep ^rgw.foo. | awk '{print $1}'`; do
ceph orch daemon stop $rgw
while ! ceph orch ps | grep $rgw | grep stopped; do sleep 1 ; done
while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done
ceph orch daemon start $rgw
while ! ceph orch ps | grep $rgw | grep running; do sleep 1 ; done
done
# stop each haproxy in turn
echo "Check with each haproxy down in turn..."
for haproxy in `ceph orch ps | grep ^haproxy.rgw.foo. | awk '{print $1}'`; do
ceph orch daemon stop $haproxy
while ! ceph orch ps | grep $haproxy | grep stopped; do sleep 1 ; done
while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done
ceph orch daemon start $haproxy
while ! ceph orch ps | grep $haproxy | grep running; do sleep 1 ; done
done
while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done
|