From 50281e0169bd08480cd767dca41daf02e2b73d1f Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Sat, 16 Apr 2022 20:54:44 +0530 Subject: [PATCH] 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 --- qa/tasks/cephfs/test_snap_schedules.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qa/tasks/cephfs/test_snap_schedules.py b/qa/tasks/cephfs/test_snap_schedules.py index 7a7259870ad..72c197019a8 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') -- 2.47.3