Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 317090 Details for
Bug 441841
VM applet will not open Virtual console for domain
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Fix virt-manager --show* options.
virt-manager-0.5.3-fix-cli-options.patch (text/plain), 5.04 KB, created by
Cole Robinson
on 2008-09-18 16:21:52 UTC
(
hide
)
Description:
Fix virt-manager --show* options.
Filename:
MIME Type:
Creator:
Cole Robinson
Created:
2008-09-18 16:21:52 UTC
Size:
5.04 KB
patch
obsolete
>diff -rup --exclude='*.orig' old/src/virtManager/connection.py new/src/virtManager/connection.py >--- old/src/virtManager/connection.py 2008-09-18 11:11:19.249138000 -0400 >+++ new/src/virtManager/connection.py 2008-09-18 11:13:06.596853000 -0400 >@@ -116,6 +116,8 @@ class vmmConnection(gobject.GObject): > self.readOnly = readOnly > > self.connectThread = None >+ self.connectThreadEvent = threading.Event() >+ self.connectThreadEvent.set() > self.connectError = None > self.uri = uri > if self.uri is None or self.uri.lower() == "xen": >@@ -332,6 +334,7 @@ class vmmConnection(gobject.GObject): > self.emit("state-changed") > > logging.debug("Scheduling background open thread for " + self.uri) >+ self.connectThreadEvent.clear() > self.connectThread = threading.Thread(target = self._open_thread, name="Connect " + self.uri) > self.connectThread.setDaemon(True) > self.connectThread.start() >@@ -387,6 +390,7 @@ class vmmConnection(gobject.GObject): > self.emit("connect-error", self.connectError) > self.connectError = None > finally: >+ self.connectThreadEvent.set() > gtk.gdk.threads_leave() > > >diff -rup --exclude='*.orig' old/src/virtManager/engine.py new/src/virtManager/engine.py >--- old/src/virtManager/engine.py 2008-09-18 11:11:19.220138000 -0400 >+++ new/src/virtManager/engine.py 2008-09-18 11:13:06.602851000 -0400 >@@ -309,6 +309,15 @@ class vmmEngine(gobject.GObject): > def show_manager(self): > self.get_manager().show() > >+ def wait_for_open(self, uri): >+ # Used to ensure connection fully starts before running >+ # ONLY CALL FROM WITHIN A THREAD >+ conn = self.connect_to_uri(uri) >+ conn.connectThreadEvent.wait() >+ if conn.state != conn.STATE_ACTIVE: >+ return False >+ return True >+ > def show_create(self, uri): > con = self.get_connection(uri) > >diff -rup --exclude='*.orig' old/src/virt-manager.py.in new/src/virt-manager.py.in >--- old/src/virt-manager.py.in 2008-09-18 11:11:19.366055000 -0400 >+++ new/src/virt-manager.py.in 2008-09-18 11:24:24.734156000 -0400 >@@ -27,6 +27,7 @@ import locale > import gettext > import logging > import logging.handlers >+import threading > import traceback > from optparse import OptionParser, OptionValueError > >@@ -156,8 +157,10 @@ def parse_commandline(): > > return optParser.parse_args() > >-# maps --show-* to engine (ie local instance) methods >-def show_engine(engine, show, uri, uuid): >+def launch_specific_window(engine, show, uri, uuid): >+ if not engine.wait_for_open(uri): >+ # Connection failed, don't attempt to continue >+ return > if show=='creator': > engine.show_create(uri) > elif show=='editor': >@@ -166,10 +169,23 @@ def show_engine(engine, show, uri, uuid) > engine.show_details_performance(uri, uuid) > elif show=='console': > engine.show_console(uri, uuid) >+ >+# maps --show-* to engine (ie local instance) methods >+def show_engine(engine, show, uri, uuid): >+ if show=='creator' or show=='editor' \ >+ or show=='performance' or show=='console': >+ # Create a thread so we can wait for connection to _fully_ start, >+ # to prevent races accessing uninit'd vars for ex. the create wizard >+ # which expects the connection to be active. >+ thread = threading.Thread(target=launch_specific_window, >+ args=(engine, show, uri, uuid), >+ name="Launching '%s' window" % show) >+ thread.start() > elif show=='summary' or uri: > engine.connect_to_uri(uri) > else: >- if engine.config.get_connections() is None or len(engine.config.get_connections()) == 0: >+ if engine.config.get_connections() is None \ >+ or len(engine.config.get_connections()) == 0: > tryuri = None > if os.path.exists("/var/lib/xend") and os.path.exists("/proc/xen"): > tryuri = "xen:///" >@@ -184,14 +200,15 @@ def show_engine(engine, show, uri, uuid) > > # maps --show-* to remote manager (ie dbus call) methods > def show_remote(managerObj, show, uri, uuid): >- if show=='creator': >- managerObj.show_domain_creator(uri) >- elif show=='editor': >- managerObj.show_domain_editor(uri, uuid) >- elif show=='performance': >- managerObj.show_domain_performance(uri, uuid) >- elif show=='console': >- managerObj.show_domain_console(uri, uuid) >+ if show=='creator' or show=='editor' \ >+ or show=='performance' or show=='console': >+ # Create a thread so we can wait for connection to _fully_ start, >+ # to prevent races accessing uninit'd vars for ex. the create wizard >+ # which expects the connection to be active. >+ thread = threading.Thread(target=launch_specific_window, >+ args=(managerObj, show, uri, uuid), >+ name="Launching '%s' window" % show) >+ thread.start() > elif show=='summary' or uri: > managerObj.show_host_summary(uri) > else:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 441841
: 317090