From 8c4f1d9fe8015744a51b6479e1ed699938e5db2c Mon Sep 17 00:00:00 2001 From: fangebee <78966083+fangebee@users.noreply.github.com> Date: Thu, 13 Mar 2025 18:17:21 +0100 Subject: [PATCH 1/2] Workaround issue #663 do not confuse a network volume with a network interface --- vrtManager/instance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrtManager/instance.py b/vrtManager/instance.py index 9cbe83e..e9659a5 100644 --- a/vrtManager/instance.py +++ b/vrtManager/instance.py @@ -631,7 +631,7 @@ class wvmInstance(wvmConnect): dev_type = dev.get("type") dev_device = dev.get("device") - if dev_type == "file": + if dev_type == "file" or (dev_device == "disk" and dev_type == "network"): dev_target = dev.find("target").get("dev") elif dev_type == "network": From f26fa3d05060ee68fb0a163f4f8d1d29ef4eda77 Mon Sep 17 00:00:00 2001 From: fangebee <78966083+fangebee@users.noreply.github.com> Date: Fri, 14 Mar 2025 10:31:40 +0100 Subject: [PATCH 2/2] Detect RDB pools too --- vrtManager/storage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vrtManager/storage.py b/vrtManager/storage.py index 03024f9..0037de2 100644 --- a/vrtManager/storage.py +++ b/vrtManager/storage.py @@ -34,6 +34,8 @@ class wvmStorages(wvmConnect): stg = wvmStorage(self.host, self.login, self.passwd, self.conn, pool_name) if stg.get_target_path() == target: return self.get_storage(pool_name) + if stg.get_type() == "rbd" and stg.get_source_name() == target: + return self.get_storage(pool_name) return None def create_storage(self, stg_type, name, source, target):