From ffa7ba93e25b312091c96535c25a8c30518a2379 Mon Sep 17 00:00:00 2001 From: Andreas Teuchert Date: Fri, 16 Sep 2022 15:28:25 +0530 Subject: [PATCH] mgr/snap_schedule: Use rados.Ioctx.remove_object() instead of remove(). This fixes the "AttributeError: 'rados.Ioctx' object has no attribute 'remove'" error. Resolves: rhbz#2126269 Signed-off-by: Andreas Teuchert (cherry picked from commit bb958f18af615377852d1579da936ea6c62d6056) --- src/pybind/mgr/snap_schedule/fs/schedule_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/snap_schedule/fs/schedule_client.py b/src/pybind/mgr/snap_schedule/fs/schedule_client.py index a22f658dffed9..b0ad8efa0e383 100644 --- a/src/pybind/mgr/snap_schedule/fs/schedule_client.py +++ b/src/pybind/mgr/snap_schedule/fs/schedule_client.py @@ -190,7 +190,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) -- 2.39.5