Skip to content

Commit 9a46c52

Browse files
committed
qa: do the set/get attribute on the remote filesystem
Fixes: https://tracker.ceph.com/issues/67435 Signed-off-by: Jos Collin <[email protected]>
1 parent 8017ef5 commit 9a46c52

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

qa/tasks/cephfs/test_mirroring.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,8 +1494,21 @@ def test_get_set_mirror_dirty_snap_id(self):
14941494
"""
14951495
That get/set ceph.mirror.dirty_snap_id attribute succeeds in a remote filesystem.
14961496
"""
1497+
log.debug('reconfigure client auth caps')
1498+
self.get_ceph_cmd_result(
1499+
'auth', 'caps', "client.{0}".format(self.mount_b.client_id),
1500+
'mds', 'allow rw',
1501+
'mon', 'allow r',
1502+
'osd', 'allow rw pool={0}, allow rw pool={1}'.format(
1503+
self.backup_fs.get_data_pool_name(),
1504+
self.backup_fs.get_data_pool_name()))
1505+
log.debug(f'mounting filesystem {self.secondary_fs_name}')
1506+
self.mount_b.umount_wait()
1507+
self.mount_b.mount_wait(cephfs_name=self.secondary_fs_name)
1508+
log.debug('setting ceph.mirror.dirty_snap_id attribute')
14971509
self.mount_b.run_shell(["mkdir", "-p", "d1/d2/d3"])
14981510
attr = str(random.randint(1, 10))
14991511
self.mount_b.setfattr("d1/d2/d3", "ceph.mirror.dirty_snap_id", attr)
1512+
log.debug('getting ceph.mirror.dirty_snap_id attribute')
15001513
val = self.mount_b.getfattr("d1/d2/d3", "ceph.mirror.dirty_snap_id")
15011514
self.assertEqual(attr, val, f"Mismatch for ceph.mirror.dirty_snap_id value: {attr} vs {val}")

0 commit comments

Comments
 (0)