]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/vol: handle case where clone index entry goes missing 58558/head
authorRishabh Dave <ridave@redhat.com>
Mon, 17 Jun 2024 19:03:28 +0000 (00:33 +0530)
committerRishabh Dave <ridave@redhat.com>
Fri, 12 Jul 2024 14:44:13 +0000 (20:14 +0530)
commit786575910c0c61355f94cac842b64041014e6c55
tree7742fc37e94f53f14315f92c7c517c6dfa50ca71
parent1509826b8b5cab42ec7a42e06ffe83536cb1f518
mgr/vol: handle case where clone index entry goes missing

In `async_cloner.py`, clone index entry is fetched to get next clone job
that needs to be executed. It might happen that the clone job was
cancelled just when it was going to be picked for execution (IOW, when
it was about to move from pending state to in-progress state).

Currently, MGR hangs in such a case because exception `ObjectNotFound`
from CephFS Python bindings is raised and is left uncaught. To prevent
this issue catch the exception, log it and return None to tell
`get_job()` of `async_job.py` to look for next job in the queue.

Increase the scope of try-except in method `get_oldest_clone_entry()` of
`async_cloner.py` so that when exception `cephfs.Error` or any exception
under it is thrown by `self.fs.lstat()` is not left uncaught.

FS object is also passed to the method `list_one_entry_at_a_time()`, so
increasing scope of try-except is useful as it will not allow exceptions
raised in other calls to CephFS Python binding methods to be left
uncaught.

Fixes: https://tracker.ceph.com/issues/66560
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 3cff7251c86a4670768721f924b11b3de33f807b)
src/pybind/mgr/volumes/fs/operations/clone_index.py