The "rbd-wnbd unmap" command is currently telling the WNBD driver
to remove the mapping without contacting the rbd-wnbd daemon
and waiting for it to perform its cleanup.
For this reason, attempting to delete the image immediately after
unmapping it can fail due to existing watchers.
As a temporary solution, we'll retry the image remove operation.
At a later time, we'll update the "rbd-wnbd unmap" command to go
through the rbd-wnbd daemon, ensuring that all the necessary
cleanup is performed before returning.
While at it, we're dropping a redundant LOG.error call so that we
won't print expected exceptions.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
exc = CommandFailed(
command=args, returncode=result.returncode,
stdout=result.stdout, stderr=result.stderr)
- LOG.error(exc)
raise exc
return result
self.mapped = False
@Tracer.trace
+ @retry_decorator()
def remove(self):
if not self.removed:
LOG.info("Removing image: %s", self.name)