From: Andreas Teuchert Date: Thu, 7 Jul 2022 12:55:59 +0000 (+0000) Subject: mgr/snap_schedule: Use rados.Ioctx.remove_object() instead of remove(). X-Git-Tag: v17.2.4~3^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e8664b64abf0117c303ee34d2e89a26470f9fcdd;p=ceph.git mgr/snap_schedule: Use rados.Ioctx.remove_object() instead of remove(). This fixes the "AttributeError: 'rados.Ioctx' object has no attribute 'remove'" error. Signed-off-by: Andreas Teuchert (cherry picked from commit bb958f18af615377852d1579da936ea6c62d6056) --- diff --git a/src/pybind/mgr/snap_schedule/fs/schedule_client.py b/src/pybind/mgr/snap_schedule/fs/schedule_client.py index 59501378f160d..486582074767e 100644 --- a/src/pybind/mgr/snap_schedule/fs/schedule_client.py +++ b/src/pybind/mgr/snap_schedule/fs/schedule_client.py @@ -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)