[Pkg-libvirt-commits] [SCM] VirtManager Debian packaging branch, master, updated. debian/0.9.1-2
Guido Günther
agx at sigxcpu.org
Tue Feb 14 11:34:20 UTC 2012
The following commit has been merged in the master branch:
commit d0d2014a08044ddb0108cac734a578ee4de9f4eb
Author: Guido Günther <agx at sigxcpu.org>
Date: Tue Feb 14 12:19:04 2012 +0100
manager: Fix error reporting when can't connect remotely
Thanks: Cole Robinson
Closes: #659860
diff --git a/debian/patches/0003-manager-Fix-error-reporting-when-can-t-connect-remot.patch b/debian/patches/0003-manager-Fix-error-reporting-when-can-t-connect-remot.patch
new file mode 100644
index 0000000..3932615
--- /dev/null
+++ b/debian/patches/0003-manager-Fix-error-reporting-when-can-t-connect-remot.patch
@@ -0,0 +1,102 @@
+From: Cole Robinson <crobinso at redhat.com>
+Date: Thu, 2 Feb 2012 16:45:18 -0500
+Subject: manager: Fix error reporting when can't connect remotely
+
+Also rejigger the error building again to be more useful and
+less scary in cases where we are pretty confident we know what the
+problem is.
+---
+ src/virtManager/manager.py | 75 +++++++++++++++++++++++++------------------
+ 1 files changed, 44 insertions(+), 31 deletions(-)
+
+diff --git a/src/virtManager/manager.py b/src/virtManager/manager.py
+index 9d2be6e..c32556c 100644
+--- a/src/virtManager/manager.py
++++ b/src/virtManager/manager.py
+@@ -648,42 +648,55 @@ class vmmManager(vmmGObjectUI):
+ conn.open()
+ return True
+
+- def _connect_error(self, conn, shortmsg, tb, warnconsole):
+- shortmsg = shortmsg.strip(" \n")
++ def _connect_error(self, conn, errmsg, tb, warnconsole):
++ errmsg = errmsg.strip(" \n")
+ tb = tb.strip(" \n")
+- msg = _("Unable to connect to libvirt:\n\n%s\n\n") % shortmsg
++ hint = ""
++ show_errmsg = True
++
++ if conn.is_remote():
++ logging.debug(conn.get_transport())
++ if re.search(r"nc: .* -- 'U'", tb):
++ hint += _("The remote host requires a version of netcat/nc\n"
++ "which supports the -U option.")
++ show_errmsg = False
++ elif conn.get_transport()[0] == "ssh" and re.search(r"ssh-askpass", tb):
++ hint += _("You need to install openssh-askpass or similar\n"
++ "to connect to this host.")
++ show_errmsg = False
++ else:
++ hint += _("Verify that the 'libvirtd' daemon is running\n"
++ "on the remote host.")
+
+- if conn.is_xen() and not conn.is_remote():
+- msg += _("Verify that:\n"
+- " - A Xen host kernel was booted\n"
+- " - The Xen service has been started\n")
+- msg = msg.strip("\n")
+- details = "%s\n\n%s" % (msg, tb)
++ elif conn.is_xen():
++ hint += _("Verify that:\n"
++ " - A Xen host kernel was booted\n"
++ " - The Xen service has been started")
+
+ else:
+- hints = []
+- if conn.is_remote() and re.search(r"nc: .* -- 'U'", details):
+- hints.append(
+- _("\n - The remote netcat understands the '-U' option"))
+-
+ if warnconsole:
+- msg += _("Could not detect a local session: if you are \n"
+- "running virt-manager over ssh -X or VNC, you \n"
+- "may not be able to connect to libvirt as a \n"
+- "regular user. Try running as root.\n\n")
+- else:
+- msg += _("Verify that:\n" +
+- " - The 'libvirtd' daemon has been started")
+- for hint in hints:
+- msg += hint
+-
+- msg = msg.strip("\n")
+- details = (("%s\n\n" % msg) +
+- (_("Libvirt URI is: %s\n\n") % conn.get_uri()) +
+- tb)
+-
+- self.err.show_err(msg, details,
+- title=_("Virtual Machine Manager Connection Failure"))
++ hint += _("Could not detect a local session: if you are \n"
++ "running virt-manager over ssh -X or VNC, you \n"
++ "may not be able to connect to libvirt as a \n"
++ "regular user. Try running as root.")
++ show_errmsg = False
++ elif re.search(r"libvirt-sock", tb):
++ hint += _("Verify that the 'libvirtd' daemon is running.")
++ show_errmsg = False
++
++ msg = _("Unable to connect to libvirt.")
++ if show_errmsg:
++ msg += "\n\n%s" % errmsg
++ if hint:
++ msg += "\n\n%s" % hint
++
++ msg = msg.strip("\n")
++ details = msg
++ details += "\n\n"
++ details += "Libvirt URI is: %s\n\n" % conn.get_uri()
++ details += tb
++
++ self.err.show_err(msg, details, title=_("Virtual Machine Manager Connection Failure"))
+
+
+ ####################################
diff --git a/debian/patches/series b/debian/patches/series
index 16e90ac..9c55122 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-use-usr-share-gconf-for-schema-data.patch
0002-Use-IPy-from-python-ipy.patch
+0003-manager-Fix-error-reporting-when-can-t-connect-remot.patch
--
VirtManager Debian packaging
More information about the Pkg-libvirt-commits
mailing list