mirror of
https://src.fedoraproject.org/rpms/virt-manager.git
synced 2025-07-16 17:14:53 +00:00
Remove unused patches
This commit is contained in:
@@ -1,121 +0,0 @@
|
||||
commit 13dd371e4840b8dca70508477cfc6820ac5d9a71
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed Feb 8 14:15:15 2012 -0500
|
||||
|
||||
Don't let media polling block app if a connection goes down
|
||||
|
||||
If we unplug a remote machine we are connected to, doing the media
|
||||
timeout with a gobject timeout means running it in the main thread,
|
||||
which if it's blocking on the remote connection will freeze the whole
|
||||
app.
|
||||
|
||||
diff --git a/src/virtManager/connection.py b/src/virtManager/connection.py
|
||||
index 15c1d5e..d649c44 100644
|
||||
--- a/src/virtManager/connection.py
|
||||
+++ b/src/virtManager/connection.py
|
||||
@@ -1583,6 +1583,9 @@ class vmmConnection(vmmGObject):
|
||||
"connection doesn't seem to have dropped. "
|
||||
"Ignoring.")
|
||||
|
||||
+ for dev in self.mediadevs.values():
|
||||
+ dev.tick()
|
||||
+
|
||||
if not noStatsUpdate:
|
||||
self._recalculate_stats(now, updateVMs)
|
||||
|
||||
diff --git a/src/virtManager/mediadev.py b/src/virtManager/mediadev.py
|
||||
index 3731599..a046d9e 100644
|
||||
--- a/src/virtManager/mediadev.py
|
||||
+++ b/src/virtManager/mediadev.py
|
||||
@@ -19,6 +19,7 @@
|
||||
#
|
||||
|
||||
import logging
|
||||
+import time
|
||||
|
||||
import virtinst
|
||||
|
||||
@@ -49,7 +50,7 @@ class vmmMediaDevice(vmmGObject):
|
||||
|
||||
obj = vmmMediaDevice(path, key, has_media, media_label, media_key,
|
||||
dev, drvtype)
|
||||
- obj.enable_poll_for_media()
|
||||
+ obj.do_poll = True
|
||||
|
||||
return obj
|
||||
|
||||
@@ -65,7 +66,8 @@ class vmmMediaDevice(vmmGObject):
|
||||
self.media_type = media_type
|
||||
|
||||
self.nodedev_obj = nodedev_obj
|
||||
- self.poll_signal = None
|
||||
+ self.do_poll = False
|
||||
+ self.last_tick = 0
|
||||
|
||||
def _cleanup(self):
|
||||
pass
|
||||
@@ -130,50 +132,38 @@ class vmmMediaDevice(vmmGObject):
|
||||
#########################################
|
||||
# Nodedev API polling for media updates #
|
||||
#########################################
|
||||
- def enable_poll_for_media(self):
|
||||
- if self.poll_signal:
|
||||
- return
|
||||
-
|
||||
- self.poll_signal = self.safe_timeout_add(MEDIA_TIMEOUT * 1000,
|
||||
- self._poll_for_media)
|
||||
- self.add_gobject_timeout(self.poll_signal)
|
||||
-
|
||||
- def disable_poll_for_media(self):
|
||||
- self.remove_gobject_timeout(self.poll_signal)
|
||||
- self.poll_signal = None
|
||||
-
|
||||
- def _poll_for_media(self):
|
||||
- if not self.poll_signal:
|
||||
- return False
|
||||
|
||||
+ def tick(self):
|
||||
if not self.nodedev_obj:
|
||||
- return False
|
||||
+ return
|
||||
|
||||
if not self.nodedev_obj.conn.is_active():
|
||||
- return False
|
||||
+ return
|
||||
+
|
||||
+ if (time.time() - self.last_tick) < MEDIA_TIMEOUT:
|
||||
+ return
|
||||
+ self.last_tick = time.time()
|
||||
|
||||
try:
|
||||
self.nodedev_obj.refresh_xml()
|
||||
xml = self.nodedev_obj.get_xml()
|
||||
except:
|
||||
# Assume the device was removed
|
||||
- return False
|
||||
+ return
|
||||
|
||||
try:
|
||||
vobj = virtinst.NodeDeviceParser.parse(xml)
|
||||
has_media = vobj.media_available
|
||||
except:
|
||||
logging.exception("Node device CDROM polling failed")
|
||||
- return False
|
||||
+ return
|
||||
+
|
||||
+ if has_media == self.has_media():
|
||||
+ return
|
||||
|
||||
- if has_media != self.has_media():
|
||||
- self.set_media(has_media, None, None)
|
||||
- if has_media:
|
||||
- self.emit("media-added")
|
||||
- else:
|
||||
- self.emit("media-removed")
|
||||
+ self.set_media(has_media, None, None)
|
||||
+ self.idle_emit(has_media and "media-added" or "media-removed")
|
||||
|
||||
- return True
|
||||
|
||||
vmmGObject.type_register(vmmMediaDevice)
|
||||
vmmMediaDevice.signal_new(vmmMediaDevice, "media-added", [])
|
@@ -1,22 +0,0 @@
|
||||
diff -rup virt-manager-0.9.1/src/vmm-preferences.glade new/src/vmm-preferences.glade
|
||||
--- virt-manager-0.9.1/src/vmm-preferences.glade 2012-01-27 09:38:01.000000000 -0500
|
||||
+++ new/src/vmm-preferences.glade 2012-02-13 19:05:22.890465706 -0500
|
||||
@@ -398,8 +398,8 @@ Always</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label15">
|
||||
<property name="visible">True</property>
|
||||
- <property name="tooltip" translatable="yes">Force console menu accelerators while the console is active. Enabling this may overwrite keyboard interaction with the guest.</property>
|
||||
- <property name="label" translatable="yes">Force console keyboard shortcuts:</property>
|
||||
+ <property name="tooltip" translatable="yes">When the guest graphical console has keyboard focus, do not disable shortcuts for console window menus (Alt+F -> File, etc.) Normally these are disabled to ensure that typing in the guest does not accidentally perform an operation in virt-manager's console window.</property>
|
||||
+ <property name="label" translatable="yes">Don't disable console shortcuts:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -412,6 +412,7 @@ Always</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
+ <property name="tooltip" translatable="yes">When the guest graphical console has keyboard focus, do not disable shortcuts for console window menus (Alt+F -> File, etc.) Normally these are disabled to ensure that typing in the guest does not accidentally perform an operation in virt-manager's console window.</property>
|
||||
<signal name="toggled" handler="on_prefs_console_accels_toggled"/>
|
||||
</widget>
|
||||
<packing>
|
@@ -1,24 +0,0 @@
|
||||
commit f12f4ea1980e68a12129922f456f9275ee897f65
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Mon Feb 13 16:19:34 2012 -0500
|
||||
|
||||
create: reshow shouldn't overwrite values in visible dialog
|
||||
|
||||
diff --git a/src/virtManager/create.py b/src/virtManager/create.py
|
||||
index 56d4e27..4d02922 100644
|
||||
--- a/src/virtManager/create.py
|
||||
+++ b/src/virtManager/create.py
|
||||
@@ -169,9 +169,11 @@ class vmmCreate(vmmGObjectUI):
|
||||
|
||||
def show(self, parent, uri=None):
|
||||
logging.debug("Showing new vm wizard")
|
||||
- self.reset_state(uri)
|
||||
|
||||
- self.topwin.set_transient_for(parent)
|
||||
+ if not self.is_visible():
|
||||
+ self.reset_state(uri)
|
||||
+ self.topwin.set_transient_for(parent)
|
||||
+
|
||||
self.topwin.present()
|
||||
|
||||
def close(self, ignore1=None, ignore2=None):
|
@@ -1,53 +0,0 @@
|
||||
diff -rup virt-manager-0.9.1/src/virtManager/console.py foo/src/virtManager/console.py
|
||||
--- virt-manager-0.9.1/src/virtManager/console.py 2012-06-06 17:05:12.762334674 -0400
|
||||
+++ foo/src/virtManager/console.py 2012-06-06 17:04:59.383045040 -0400
|
||||
@@ -370,6 +370,7 @@ class VNCViewer(Viewer):
|
||||
ignore = user
|
||||
|
||||
if not socketpath:
|
||||
+ logging.debug("VNC connecting to %s:%s" % (host, port))
|
||||
self.display.open_host(host, port)
|
||||
return
|
||||
|
||||
@@ -485,7 +486,6 @@ class SpiceViewer(Viewer):
|
||||
ignore = socketpath
|
||||
|
||||
uri = "spice://"
|
||||
- uri += (user and str(user) or "")
|
||||
uri += str(host) + "?port=" + str(port)
|
||||
logging.debug("spice uri: %s", uri)
|
||||
|
||||
@@ -1084,7 +1084,7 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
|
||||
self.set_enable_accel()
|
||||
|
||||
- if transport in ("ssh", "ext"):
|
||||
+ if (transport in ("ssh", "ext")) and gaddr == "127.0.0.1":
|
||||
if self.tunnels:
|
||||
# Tunnel already open, no need to continue
|
||||
return
|
||||
@@ -1096,8 +1096,10 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
self.viewer.open_fd(fd)
|
||||
|
||||
else:
|
||||
- self.viewer.open_host(connhost, connuser,
|
||||
- str(gport), gsocket)
|
||||
+ host = gaddr
|
||||
+ if gaddr == "127.0.0.1" or gaddr == "0.0.0.0":
|
||||
+ host = connhost
|
||||
+ self.viewer.open_host(host, connuser, str(gport), gsocket)
|
||||
|
||||
except Exception, e:
|
||||
logging.exception("Error connection to graphical console")
|
||||
diff -rup virt-manager-0.9.1/src/virtManager/domain.py foo/src/virtManager/domain.py
|
||||
--- virt-manager-0.9.1/src/virtManager/domain.py 2012-01-29 15:40:49.000000000 -0500
|
||||
+++ foo/src/virtManager/domain.py 2012-06-06 17:04:59.384044912 -0400
|
||||
@@ -952,7 +952,7 @@ class vmmDomain(vmmLibvirtObject):
|
||||
if gport != None:
|
||||
gport = int(gport)
|
||||
gtype = gdev.type
|
||||
- gaddr = "127.0.0.1"
|
||||
+ gaddr = gdev.listen or "127.0.0.1"
|
||||
gsocket = gdev.socket
|
||||
|
||||
if connhost == None:
|
@@ -1,25 +0,0 @@
|
||||
commit 45119785c7efbaa1defc3fffd05cb41e39992271
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Thu Apr 5 13:28:39 2012 -0400
|
||||
|
||||
schemas: Fix key for default graphics type
|
||||
|
||||
What we installed didn't match what the app was checking and setting.
|
||||
Have it match the app key so we don't overwrite users who have changed the
|
||||
default via the prefs dialog.
|
||||
|
||||
diff --git a/src/virt-manager.schemas.in b/src/virt-manager.schemas.in
|
||||
index dfcd7ba..8154534 100644
|
||||
--- a/src/virt-manager.schemas.in
|
||||
+++ b/src/virt-manager.schemas.in
|
||||
@@ -196,8 +196,8 @@
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
- <key>/schemas/apps/::PACKAGE::/new-vm/graphics-type</key>
|
||||
- <applyto>/apps/::PACKAGE::/new-vm/graphics-type</applyto>
|
||||
+ <key>/schemas/apps/::PACKAGE::/new-vm/graphics_type</key>
|
||||
+ <applyto>/apps/::PACKAGE::/new-vm/graphics_type</applyto>
|
||||
<owner>::PACKAGE::</owner>
|
||||
<type>string</type>
|
||||
<default>::DEFAULT_GRAPHICS::</default>
|
@@ -1,101 +0,0 @@
|
||||
commit 54d007b2875a887b1579604e45b122dde286b9be
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Thu Feb 2 16:45:18 2012 -0500
|
||||
|
||||
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.
|
||||
|
||||
diff --git a/src/virtManager/manager.py b/src/virtManager/manager.py
|
||||
index 2e8a679..a4b2df5 100644
|
||||
--- a/src/virtManager/manager.py
|
||||
+++ b/src/virtManager/manager.py
|
||||
@@ -646,42 +646,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"))
|
||||
|
||||
|
||||
####################################
|
@@ -1,22 +0,0 @@
|
||||
commit 265e04205e4766f459d4ced516dbd784cf2ca57f
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Tue Feb 7 17:13:59 2012 -0500
|
||||
|
||||
Add VDI to disk format list
|
||||
|
||||
People actually distribute images in that format:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=761300
|
||||
|
||||
diff --git a/src/virtManager/uihelpers.py b/src/virtManager/uihelpers.py
|
||||
index c274592..3ba4a71 100644
|
||||
--- a/src/virtManager/uihelpers.py
|
||||
+++ b/src/virtManager/uihelpers.py
|
||||
@@ -397,6 +397,7 @@ def build_storage_format_combo(vm, combo):
|
||||
formats = ["raw", "qcow2"]
|
||||
if vm.rhel6_defaults():
|
||||
formats.append("vmdk")
|
||||
+ formats.append("vdi")
|
||||
|
||||
for m in formats:
|
||||
dev_model.append([m])
|
@@ -1,23 +0,0 @@
|
||||
commit c47fc5454039a9e7093f179c1e06ffc576dc1ad3
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Mon Feb 6 17:57:14 2012 -0500
|
||||
|
||||
vnc: Fix accidental recursion we reporting grab keys
|
||||
|
||||
diff --git a/src/virtManager/console.py b/src/virtManager/console.py
|
||||
index 3b39a6c..13fc755 100644
|
||||
--- a/src/virtManager/console.py
|
||||
+++ b/src/virtManager/console.py
|
||||
@@ -387,12 +387,6 @@ class VNCViewer(Viewer):
|
||||
def open_fd(self, fd):
|
||||
self.display.open_fd(fd)
|
||||
|
||||
- def get_grab_keys(self):
|
||||
- keystr = self.get_grab_keys()
|
||||
- if not keystr:
|
||||
- keystr = "Control_L+Alt_L"
|
||||
- return keystr
|
||||
-
|
||||
def set_credential_username(self, cred):
|
||||
self.display.set_credential(gtkvnc.CREDENTIAL_USERNAME, cred)
|
||||
|
Reference in New Issue
Block a user