From 0d73d31b6f92d45c602d704b39d11d11536b0a93 Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Wed, 2 Aug 2023 09:50:37 +0000 Subject: [PATCH] qa: update rbd-wnbd test, retrying image rm operations 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 --- qa/workunits/windows/test_rbd_wnbd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/workunits/windows/test_rbd_wnbd.py b/qa/workunits/windows/test_rbd_wnbd.py index db14234a2b5f0..0eb7653b0e982 100644 --- a/qa/workunits/windows/test_rbd_wnbd.py +++ b/qa/workunits/windows/test_rbd_wnbd.py @@ -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) -- 2.39.5