Avoiding this failure:
2020-11-03T03:11:59.980 INFO:tasks.cephfs_test_runner:test_subvolume_resize_fail_quota_lt_used_size_no_shrink (tasks.cephfs.test_volumes.TestSubvolumes) ... FAIL
2020-11-03T03:11:59.981 INFO:tasks.cephfs_test_runner:
2020-11-03T03:11:59.981 INFO:tasks.cephfs_test_runner:======================================================================
2020-11-03T03:11:59.981 INFO:tasks.cephfs_test_runner:FAIL: test_subvolume_resize_fail_quota_lt_used_size_no_shrink (tasks.cephfs.test_volumes.TestSubvolumes)
2020-11-03T03:11:59.982 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2020-11-03T03:11:59.982 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2020-11-03T03:11:59.982 INFO:tasks.cephfs_test_runner: File "/home/teuthworker/src/git.ceph.com_ceph-c_wip-pdonnell-testing-
20201102.231317/qa/tasks/cephfs/test_volumes.py", line 1310, in test_subvolume_resize_fail_quota_lt_used_size_no_shrink
2020-11-03T03:11:59.982 INFO:tasks.cephfs_test_runner: self.assertEqual(usedsize, susedsize)
2020-11-03T03:11:59.982 INFO:tasks.cephfs_test_runner:AssertionError:
8912896 != 1
From: /ceph/teuthology-archive/pdonnell-2020-11-03_02:22:55-fs:volumes-wip-pdonnell-testing-
20201102.231317-distro-basic-smithi/
5585383/teuthology.log
Fixes: https://tracker.ceph.com/issues/23718
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
usedsize = int(self.mount_a.getfattr(subvolpath, "ceph.dir.rbytes"))
susedsize = int(self.mount_a.run_shell(['stat', '-c' '%s', subvolpath]).stdout.getvalue().strip())
- self.assertEqual(usedsize, susedsize)
+ if isinstance(self.mount_a, FuseMount):
+ # kclient dir does not have size==rbytes
+ self.assertEqual(usedsize, susedsize)
# shrink the subvolume
nsize = usedsize // 2
usedsize = int(self.mount_a.getfattr(subvolpath, "ceph.dir.rbytes"))
susedsize = int(self.mount_a.run_shell(['stat', '-c' '%s', subvolpath]).stdout.getvalue().strip())
- self.assertEqual(usedsize, susedsize)
+ if isinstance(self.mount_a, FuseMount):
+ # kclient dir does not have size==rbytes
+ self.assertEqual(usedsize, susedsize)
# shrink the subvolume
nsize = usedsize // 2