]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: adjust for old snapshot counts during comparison 45906/head
authorVenky Shankar <vshankar@redhat.com>
Sat, 16 Apr 2022 15:24:44 +0000 (20:54 +0530)
committerVenky Shankar <vshankar@redhat.com>
Mon, 18 Apr 2022 06:20:11 +0000 (11:50 +0530)
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 <vshankar@redhat.com>
qa/tasks/cephfs/test_snap_schedules.py

index 7a7259870ad62fbd7c1b9132f5f90d4032c41351..72c197019a83458c479b0c1bd76b8335f33e68f4 100644 (file)
@@ -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')