]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephadm: teuth test for keepalive-only ingress over nfs
authorAdam King <adking@redhat.com>
Mon, 13 Mar 2023 20:50:14 +0000 (16:50 -0400)
committerAdam King <adking@redhat.com>
Sat, 20 May 2023 16:53:24 +0000 (12:53 -0400)
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit e90583083379192cee1e6c58300dcadb3fd20376)

qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-keepalive-only.yaml [new file with mode: 0644]

diff --git a/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-keepalive-only.yaml b/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-keepalive-only.yaml
new file mode 100644 (file)
index 0000000..ba5afed
--- /dev/null
@@ -0,0 +1,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