It might happen that clone index entry goes missing because a clone job
was completed or cancelled. In such a case, lstat() to clone entry's
path would fail. Catch the exception in such a case and handle it so
that clone progress reporter thread doesn't crash.
Crashing of clone progress reporter thread causes clone progress bars to
not be removed from "ceph status" output when they should, resulting in
these bars to being in stuck in the output forever.
Fixes: https://tracker.ceph.com/issues/70941
Signed-off-by: Rishabh Dave <ridave@redhat.com>
ens_with_ctime = []
for en in entry_names:
d_path = os.path.join(self.path, en)
- stb = self.fs.lstat(d_path)
+ try:
+ stb = self.fs.lstat(d_path)
+ except cephfs.ObjectNotFound:
+ log.debug(f'path {d_path} went missing, perhaps clone job was '
+ 'finished')
+ continue
# add ctime next to clone entry
ens_with_ctime.append((en, stb.st_ctime))