]> git.proxmox.com Git - ceph.git/blob - ceph/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress.yaml
import ceph 16.2.7
[ceph.git] / ceph / qa / suites / orch / cephadm / smoke-roleless / 2-services / nfs-ingress.yaml
1 tasks:
2 - vip:
3
4 # make sure cephadm notices the new IP
5 - cephadm.shell:
6 host.a:
7 - ceph orch device ls --refresh
8
9 # stop kernel nfs server, if running
10 - vip.exec:
11 all-hosts:
12 - systemctl stop nfs-server
13
14 - cephadm.shell:
15 host.a:
16 - ceph fs volume create foofs
17
18 # deploy nfs + ingress
19 - cephadm.apply:
20 specs:
21 - service_type: nfs
22 service_id: foo
23 placement:
24 count: 2
25 spec:
26 port: 12049
27 - service_type: ingress
28 service_id: nfs.foo
29 spec:
30 backend_service: nfs.foo
31 frontend_port: 2049
32 monitor_port: 9002
33 virtual_ip: "{{VIP0}}/{{VIPPREFIXLEN}}"
34 - cephadm.wait_for_service:
35 service: nfs.foo
36 - cephadm.wait_for_service:
37 service: ingress.nfs.foo
38
39 ## export and mount
40
41 - cephadm.shell:
42 host.a:
43 - ceph nfs export create cephfs --fsname foofs --cluster-id foo --pseudo-path /fake
44
45 - vip.exec:
46 host.a:
47 - mkdir /mnt/foo
48 - sleep 5
49 - mount -t nfs {{VIP0}}:/fake /mnt/foo
50 - echo test > /mnt/foo/testfile
51 - sync
52
53 # take each gateway down in turn and ensure things still work
54 - cephadm.shell:
55 volumes:
56 - /mnt/foo:/mnt/foo
57 host.a:
58 - |
59 echo "Check with each haproxy down in turn..."
60 for haproxy in `ceph orch ps | grep ^haproxy.nfs.foo. | awk '{print $1}'`; do
61 ceph orch daemon stop $haproxy
62 while ! ceph orch ps | grep $haproxy | grep stopped; do sleep 1 ; done
63 cat /mnt/foo/testfile
64 echo $haproxy > /mnt/foo/testfile
65 sync
66 ceph orch daemon start $haproxy
67 while ! ceph orch ps | grep $haproxy | grep running; do sleep 1 ; done
68 done