]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/snap_schedule: Use rados.Ioctx.remove_object() instead of remove(). 47006/head
authorAndreas Teuchert <a.teuchert@syseleven.de>
Thu, 7 Jul 2022 12:55:59 +0000 (12:55 +0000)
committerAndreas Teuchert <a.teuchert@syseleven.de>
Thu, 7 Jul 2022 12:55:59 +0000 (12:55 +0000)
This fixes the "AttributeError: 'rados.Ioctx' object has no attribute
'remove'" error.

Signed-off-by: Andreas Teuchert <a.teuchert@syseleven.de>
src/pybind/mgr/snap_schedule/fs/schedule_client.py

index 311f39eb9a3d8b49ec07cd154871e5cd11a47fe6..50399d496213be0560e68a18b1872623c94f1f24 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)