]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/snap_schedule: Use rados.Ioctx.remove_object() instead of remove(). 48013/head
authorAndreas Teuchert <a.teuchert@syseleven.de>
Thu, 7 Jul 2022 12:55:59 +0000 (12:55 +0000)
committerMilind Changire <mchangir@redhat.com>
Thu, 8 Sep 2022 06:41:38 +0000 (12:11 +0530)
This fixes the "AttributeError: 'rados.Ioctx' object has no attribute
'remove'" error.

Signed-off-by: Andreas Teuchert <a.teuchert@syseleven.de>
(cherry picked from commit bb958f18af615377852d1579da936ea6c62d6056)

src/pybind/mgr/snap_schedule/fs/schedule_client.py

index 59501378f160d9c11fcbd190eb8afc10ae777270..486582074767ed303dac712ceac7481dd01cb8cf 100644 (file)
@@ -201,7 +201,7 @@ class SnapSchedClient(CephfsClient):
                     size, _mtime = ioctx.stat(SNAP_DB_OBJECT_NAME)
                     dump = ioctx.read(SNAP_DB_OBJECT_NAME, size).decode('utf-8')
                     db.executescript(dump)
-                    ioctx.remove(SNAP_DB_OBJECT_NAME)
+                    ioctx.remove_object(SNAP_DB_OBJECT_NAME)
                 except rados.ObjectNotFound:
                     log.debug(f'No legacy schedule DB found in {fs}')
             db.executescript(Schedule.CREATE_TABLES)