]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/suites/rbd: use client.0 entity in migration-external tests
authorIlya Dryomov <idryomov@gmail.com>
Mon, 29 Jun 2026 11:39:50 +0000 (13:39 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 1 Jul 2026 19:53:53 +0000 (21:53 +0200)
Currently client.admin is passed for client_name and that doesn't
exercise client_name handling much as client.admin is the default.

When deploying multiple clusters the ceph task distributes keyrings
with only the key for the initial monitor and client.admin key.  Other
keys (e.g. client.0) are present only on their respective clusters, so
client.0's key for cluster2 needs to be obtained on cluster1 explicitly
with "ceph auth get".

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
qa/suites/rbd/migration-external/6-prepare/native-clone.yaml
qa/suites/rbd/migration-external/6-prepare/native-standalone.yaml

index 2ca92dccfde64582c0500e26e8b6516b2c53bc83..96fc00125495239eb4a70db437483a37b5243730 100644 (file)
@@ -22,8 +22,11 @@ tasks:
         - rbd --cluster cluster2 clone client.0.2-src@snap client.0.2
         - rbd --cluster cluster2 bench --io-type write --io-pattern rand --io-size 16K --io-threads 1 --io-total 2M client.0.2
         - rbd --cluster cluster2 snap create client.0.2@snap
+        - ceph --cluster cluster2 auth caps client.0 mon 'profile rbd' mgr 'profile rbd-read-only' osd 'profile rbd-read-only'
   - exec:
       cluster1.client.0:
-        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.admin","pool_name":"rbd","image_name":"client.0.0","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.0
-        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.admin","pool_name":"rbd","image_name":"client.0.1","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.1
-        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.admin","pool_name":"rbd","image_name":"client.0.2","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.2
+        - ceph --cluster cluster2 auth get client.0 -o /etc/ceph/cluster2.client.0.keyring
+        - ceph --cluster cluster1 auth caps client.0 mon 'profile rbd' mgr 'profile rbd' osd 'profile rbd'
+        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.0","pool_name":"rbd","image_name":"client.0.0","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.0
+        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.0","pool_name":"rbd","image_name":"client.0.1","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.1
+        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.0","pool_name":"rbd","image_name":"client.0.2","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.2
index 5fdf4d35c261aed6763c9f1e80d069047c268a50..9da9b799ffc18327430c1f67c297f7d15311a738 100644 (file)
@@ -11,8 +11,11 @@ tasks:
         - rbd --cluster cluster2 create --size 1G client.0.2
         - rbd --cluster cluster2 bench --io-type write --io-pattern rand --io-size 16K --io-threads 1 --io-total 2M client.0.2
         - rbd --cluster cluster2 snap create client.0.2@snap
+        - ceph --cluster cluster2 auth caps client.0 mon 'profile rbd' mgr 'profile rbd-read-only' osd 'profile rbd-read-only'
   - exec:
       cluster1.client.0:
-        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.admin","pool_name":"rbd","image_name":"client.0.0","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.0
-        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.admin","pool_name":"rbd","image_name":"client.0.1","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.1
-        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.admin","pool_name":"rbd","image_name":"client.0.2","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.2
+        - ceph --cluster cluster2 auth get client.0 -o /etc/ceph/cluster2.client.0.keyring
+        - ceph --cluster cluster1 auth caps client.0 mon 'profile rbd' mgr 'profile rbd' osd 'profile rbd'
+        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.0","pool_name":"rbd","image_name":"client.0.0","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.0
+        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.0","pool_name":"rbd","image_name":"client.0.1","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.1
+        - echo '{"type":"native","cluster_name":"cluster2","client_name":"client.0","pool_name":"rbd","image_name":"client.0.2","snap_name":"snap"}' | rbd --cluster cluster1 migration prepare --import-only --source-spec-path - client.0.2