49 lines
2.0 KiB
Diff
49 lines
2.0 KiB
Diff
|
Subject: virtinst: add method to set connection keep-alive
|
||
|
From: Giuseppe Scrivano gscrivan@redhat.com Tue Jul 1 12:54:38 2014 +0200
|
||
|
Date: Wed Jul 2 15:31:40 2014 +0200:
|
||
|
Git: 3606bb573df4132a70b9e0fe82a59cd49a400fa0
|
||
|
|
||
|
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
||
|
|
||
|
Subject: virt-manager: check if still connected every 20 seconds
|
||
|
From: Giuseppe Scrivano gscrivan@redhat.com Tue Jul 1 13:06:05 2014 +0200
|
||
|
Date: Wed Jul 2 15:31:40 2014 +0200:
|
||
|
Git: 538c68a41dd0538c36e442ad37690b1b9c3debee
|
||
|
|
||
|
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
||
|
|
||
|
Index: virt-manager-1.0.1/virtinst/connection.py
|
||
|
===================================================================
|
||
|
--- virt-manager-1.0.1.orig/virtinst/connection.py
|
||
|
+++ virt-manager-1.0.1/virtinst/connection.py
|
||
|
@@ -1,5 +1,5 @@
|
||
|
#
|
||
|
-# Copyright 2013 Red Hat, Inc.
|
||
|
+# Copyright 2013, 2014 Red Hat, Inc.
|
||
|
#
|
||
|
# This program is free software; you can redistribute it and/or modify
|
||
|
# it under the terms of the GNU General Public License as published by
|
||
|
@@ -201,6 +201,10 @@ class VirtualConnection(object):
|
||
|
self._fetch_cache[key] = ret
|
||
|
return ret
|
||
|
|
||
|
+ def set_keep_alive(self, interval, count):
|
||
|
+ if hasattr(self._libvirtconn, "setKeepAlive"):
|
||
|
+ self._libvirtconn.setKeepAlive(interval, count)
|
||
|
+
|
||
|
def fetch_all_pools(self):
|
||
|
"""
|
||
|
Returns a list of StoragePool objects
|
||
|
Index: virt-manager-1.0.1/virtManager/connection.py
|
||
|
===================================================================
|
||
|
--- virt-manager-1.0.1.orig/virtManager/connection.py
|
||
|
+++ virt-manager-1.0.1/virtManager/connection.py
|
||
|
@@ -1112,6 +1112,7 @@ class vmmConnection(vmmGObject):
|
||
|
logging.debug("%s capabilities:\n%s",
|
||
|
self.get_uri(), self.caps.xml)
|
||
|
self._add_conn_events()
|
||
|
+ self._backend.setKeepAlive(20, 1)
|
||
|
self.schedule_priority_tick(stats_update=True,
|
||
|
pollvm=True, pollnet=True,
|
||
|
pollpool=True, polliface=True,
|