[virt-tools-list] [virt-manager PATCH 3/6] inspection: fix check of mounted filesystems
Pino Toscano
ptoscano at redhat.com
Wed Apr 17 16:49:50 UTC 2019
The old code basically always set filesystems_mounted to True, even when
no filesystems were mounted successfully, unless
g.inspect_get_mountpoints() failed (very unlikely).
Instead, set it when at least one filesystem is mounted; considering
that the first filesystem to be mounted is usually /, then failing to
mount it will usually prevent the mounting of the others. In any case,
we can try to extract data even when only / is mounted, which can work
depending on the mount points of the guest.
---
virtManager/inspection.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/virtManager/inspection.py b/virtManager/inspection.py
index 6021e130..005b410c 100644
--- a/virtManager/inspection.py
+++ b/virtManager/inspection.py
@@ -245,13 +245,12 @@ class vmmInspection(vmmGObject):
for mp, dev in mps:
try:
g.mount_ro(dev, mp)
+ filesystems_mounted = True
except Exception:
logging.exception("%s: exception mounting %s on %s "
"(ignored)",
prettyvm, dev, mp)
- filesystems_mounted = True
-
icon = None
apps = None
if filesystems_mounted:
--
2.20.1
More information about the virt-tools-list
mailing list