[PATCH][virt-manager] disconnected hosts are still alive on virt-manager.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

When a virt-manager monitors multiple hosts and
disconnecting these hosts at once,
the virt-manager window still shows that these guest domains are connected.
And they shows following message.
This patch fix this problem.

========
[Fri, 17 Oct 2008 09:42:11 virt-manager 4182] DEBUG (engine:321) window
counter decremented to 0
[Fri, 17 Oct 2008 09:42:11 virt-manager 4182] ERROR (virt-manager:148)
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/manager.py", line 550, in
conn_state_changed
    self.conn_refresh_resources(conn)
  File "/usr/share/virt-manager/virtManager/manager.py", line 568, in
conn_refresh_resources
    del self.rows[model.get_value(child, ROW_KEY)]
KeyError: '00000000-0000-0000-0000-000000000000'
None
========

Thanks,
Tomohiro Takahashi
diff -r b5d4d81dfa57 src/virtManager/manager.py
--- a/src/virtManager/manager.py        Tue Oct 14 15:39:04 2008 -0400
+++ b/src/virtManager/manager.py        Thu Oct 16 21:22:33 2008 +0900
@@ -453,7 +453,7 @@ class vmmManager(gobject.GObject):

         iter = model.append(parent, row)
         path = model.get_path(iter)
-        self.rows[vm.get_uuid()] = model[path]
+        self.rows[vm.get_uuid()+":"+conn.get_uri()] = model[path]
         # Expand a connection when adding a vm to it
         self.window.get_widget("vm-list").expand_row(model.get_path(parent), False)

@@ -564,7 +564,7 @@ class vmmManager(gobject.GObject):
             if parent is not None:
                 child = model.iter_children(parent)
                 while child is not None:
-                    del self.rows[model.get_value(child, ROW_KEY)]
+                    del self.rows[model.get_value(child, ROW_KEY)+":"+conn.get_uri()]
                     model.remove(child)
                     child = model.iter_children(parent)
         model.row_changed(row.path, row.iter)
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux