Skip to content

Commit b57eb17

Browse files
authored
Merge pull request ceph#59093 from joscollin/wip-fix-get-set-dirty-snap-id
qa: do the set/get attribute on the remote filesystem Reviewed-by: Venky Shankar <[email protected]>
2 parents 8ccb652 + 9a46c52 commit b57eb17

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
@@ -1505,9 +1505,22 @@ def test_get_set_mirror_dirty_snap_id(self):
15051505
"""
15061506
That get/set ceph.mirror.dirty_snap_id attribute succeeds in a remote filesystem.
15071507
"""
1508+
log.debug('reconfigure client auth caps')
1509+
self.get_ceph_cmd_result(
1510+
'auth', 'caps', "client.{0}".format(self.mount_b.client_id),
1511+
'mds', 'allow rw',
1512+
'mon', 'allow r',
1513+
'osd', 'allow rw pool={0}, allow rw pool={1}'.format(
1514+
self.backup_fs.get_data_pool_name(),
1515+
self.backup_fs.get_data_pool_name()))
1516+
log.debug(f'mounting filesystem {self.secondary_fs_name}')
1517+
self.mount_b.umount_wait()
1518+
self.mount_b.mount_wait(cephfs_name=self.secondary_fs_name)
1519+
log.debug('setting ceph.mirror.dirty_snap_id attribute')
15081520
self.mount_b.run_shell(["mkdir", "-p", "d1/d2/d3"])
15091521
attr = str(random.randint(1, 10))
15101522
self.mount_b.setfattr("d1/d2/d3", "ceph.mirror.dirty_snap_id", attr)
1523+
log.debug('getting ceph.mirror.dirty_snap_id attribute')
15111524
val = self.mount_b.getfattr("d1/d2/d3", "ceph.mirror.dirty_snap_id")
15121525
self.assertEqual(attr, val, f"Mismatch for ceph.mirror.dirty_snap_id value: {attr} vs {val}")
15131526

0 commit comments

Comments
 (0)