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