From b1b3e134cfc1c705b3fbcedba41617dd1c3ec26c Mon Sep 17 00:00:00 2001 From: Jan Musial Date: Mon, 20 Jun 2022 09:42:23 +0200 Subject: [PATCH] pyocf: clean-up hanging device reference Signed-off-by: Jan Musial --- tests/functional/pyocf/types/cache.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/functional/pyocf/types/cache.py b/tests/functional/pyocf/types/cache.py index c087bf4..eedd278 100644 --- a/tests/functional/pyocf/types/cache.py +++ b/tests/functional/pyocf/types/cache.py @@ -300,6 +300,8 @@ class Cache: c.wait() self.write_unlock() + self.device = None + if c.results["error"]: raise OcfError("Failed to detach failover cache device", c.results["error"])