]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/rbd_support: avoid wedging the task queue if pool is removed 49056/head
authorIlya Dryomov <idryomov@gmail.com>
Wed, 23 Nov 2022 17:10:03 +0000 (18:10 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 25 Nov 2022 11:22:32 +0000 (12:22 +0100)
commit1ed680eaff235625c0a452e93b18a3d5e45eb289
tree3e5b06449dde3ac0cae42f53b8c4a0e6a436ec07
parent78cde95d3d87171b8a5f66fe6889d592245fc72a
mgr/rbd_support: avoid wedging the task queue if pool is removed

rados.ObjectNotFound exception handler was referencing ioctx variable
which is assigned only if the pool exists and rados.open_ioctx() call
succeeds.  This lead to a fatal error

  mgr[rbd_support] Failed to locate pool mypool
  mgr[rbd_support] execute_task: [errno 2] error opening pool 'b'mypool''
  mgr[rbd_support] Fatal runtime error: local variable 'ioctx' referenced before assignment

and wedged the task queue.  No other commands were processed until
ceph-mgr daemon restart.

Fixes: https://tracker.ceph.com/issues/52932
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 5a425927ed4c0d0adee3773226ccae26c1c98d30)

Conflicts:
src/pybind/mgr/rbd_support/task.py [ commit e4a16e261370
  ("mgr/rbd_support: add type annotation") not in pacific ]
qa/workunits/rbd/cli_generic.sh
src/pybind/mgr/rbd_support/task.py