From: Venky Shankar Date: Sat, 16 Apr 2022 15:24:44 +0000 (+0530) Subject: qa: adjust for old snapshot counts during comparison X-Git-Tag: v16.2.8~21^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=50281e0169bd08480cd767dca41daf02e2b73d1f;p=ceph.git qa: adjust for old snapshot counts during comparison This is pacific only commit since in master, the snap-schedule module uses vfs-ceph backed libcephsqlite which seems to preserve the snapshots stats (created_count, etc..) on ceph-mgr restarts. Pacific uses in-memory db (serialized to a RADOS object) which seems to reset these stats when ceph-mgr is restarted. Also, remove `db_count' assert check as it doesn't make sense. Signed-off-by: Venky Shankar --- diff --git a/qa/tasks/cephfs/test_snap_schedules.py b/qa/tasks/cephfs/test_snap_schedules.py index 7a7259870ad6..72c197019a83 100644 --- a/qa/tasks/cephfs/test_snap_schedules.py +++ b/qa/tasks/cephfs/test_snap_schedules.py @@ -438,9 +438,8 @@ class TestSnapSchedules(CephFSTestCase): self.fs_snap_schedule_cmd('deactivate', path=testdir, snap_schedule='1M') new_stats = self.get_snap_stats(testdir) - self.assertTrue(new_stats['fs_count'] == new_stats['db_count']) + self.assertTrue(new_stats['fs_count'] == new_stats['db_count'] + old_stats['db_count']) self.assertTrue(new_stats['fs_count'] > old_stats['fs_count']) - self.assertTrue(new_stats['db_count'] > old_stats['db_count']) # cleanup self.fs_snap_schedule_cmd('remove', path=testdir, snap_schedule='1M')