]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/rbd_support: avoid wedging the task queue if pool is removed
authorIlya Dryomov <idryomov@gmail.com>
Wed, 23 Nov 2022 17:10:03 +0000 (18:10 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 23 Nov 2022 22:11:42 +0000 (23:11 +0100)
commit5a425927ed4c0d0adee3773226ccae26c1c98d30
tree62856058e0188a18b81e1f67fbe65017c99bde6a
parent6f0d3687934be50d2aa7201c3ad29b5a5cdc33a4
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>
qa/workunits/rbd/cli_generic.sh
src/pybind/mgr/rbd_support/task.py