summaryrefslogtreecommitdiffstats
path: root/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-keepalive-only.yaml
blob: ba5afed473b6f522e704a788b08dcbfeb0164f6f (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
tasks:
- vip:

# make sure cephadm notices the new IP
- cephadm.shell:
    host.a:
      - ceph orch device ls --refresh

# stop kernel nfs server, if running
- vip.exec:
    all-hosts:
      - systemctl stop nfs-server

- cephadm.shell:
    host.a:
      - ceph fs volume create foofs

# deploy nfs + keepalive-only ingress service
- cephadm.apply:
    specs:
      - service_type: nfs
        service_id: foo
        placement:
          count: 1
        spec:
          port: 2049
          virtual_ip: "{{VIP0}}"
      - service_type: ingress
        service_id: nfs.foo
        placement:
          count: 1
        spec:
          backend_service: nfs.foo
          monitor_port: 9002
          virtual_ip: "{{VIP0}}/{{VIPPREFIXLEN}}"
          keepalive_only: true
- cephadm.wait_for_service:
    service: nfs.foo
- cephadm.wait_for_service:
    service: ingress.nfs.foo

# export and mount
- cephadm.shell:
    host.a:
      - ceph nfs export create cephfs --fsname foofs --cluster-id foo --pseudo-path /fake

# make sure mount can be reached over VIP, ensuring both that
# keepalived is maintaining the VIP and that the nfs has bound to it
- vip.exec:
    host.a:
      - mkdir /mnt/foo
      - sleep 5
      - mount -t nfs {{VIP0}}:/fake /mnt/foo
      - echo test > /mnt/foo/testfile
      - sync