]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: update rbd-wnbd test, retrying image rm operations
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 2 Aug 2023 09:50:37 +0000 (09:50 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 1 Mar 2024 17:39:00 +0000 (17:39 +0000)
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>
qa/workunits/windows/test_rbd_wnbd.py

index db14234a2b5f0823e45dcbbd1e803f1f5ba87359..0eb7653b0e98229c323ab4010380454fd9974426 100644 (file)
@@ -162,7 +162,6 @@ def execute(*args, **kwargs):
         exc = CommandFailed(
             command=args, returncode=result.returncode,
             stdout=result.stdout, stderr=result.stderr)
-        LOG.error(exc)
         raise exc
     return result
 
@@ -367,6 +366,7 @@ class RbdImage(object):
             self.mapped = False
 
     @Tracer.trace
+    @retry_decorator()
     def remove(self):
         if not self.removed:
             LOG.info("Removing image: %s", self.name)