It's possible for librbd's watch of the header object to be reset by
connection issues just prior to the image being removed. This will
causes an assertion failure which assumes at least one watcher on the
image.
Fixes: #12176
Backport: hammer, firefly
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
af276de4f299960e43761904c043924cec5fef11)
close_image(ictx);
return -EBUSY;
}
- assert(watchers.size() == 1);
ictx->md_lock.get_read();
trim_image(ictx, 0, prog_ctx);