Commit Graph

59 Commits

Author SHA1 Message Date
Giuseppe Scrivano
1cdd10ce34 virt-manager: show the manager when using a wrong domain id
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1164691

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-17 16:50:04 +01:00
Guido Günther
1726505fd6 s/gconf/gsettings/
GConf got replaced by GSettings but some methods kept the old name
2014-09-29 08:56:37 -04:00
Cole Robinson
69b131f81f engine: Clarify a debug message 2014-09-25 10:13:20 -04:00
Cole Robinson
226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Cole Robinson
df32f9331d baseclass: Add helper for launching daemon thread
And use it in a few spots
2014-09-12 16:28:37 -04:00
Cole Robinson
bd5e57dbdc connection: Simplify state management 2014-09-12 16:28:37 -04:00
Cole Robinson
b398a46e9b domain: Cache has_managed_save value
Otherwise we call it every time a domain row is selected, which makes
things choppy on remote connections.
2014-09-12 16:28:37 -04:00
Giuseppe Scrivano
32b9653f5b virt-manager: select the initial connection
Automatically select the connection in this order:

- URI specified via command line --connect
- First active connection
- First connection

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-07-02 15:31:41 +02:00
Cole Robinson
aefd4c4824 connection: Use name instead of uuid for object keys
And clean up the API mess while we are at it. Treat the key as an opaque
value that users shouldn't depend on.

Besides the improved code clarity and API layout, this will help diagnose
'key error' issues, since we'll see an object name instead of UUID which
is hard to trace back.
2014-06-02 17:48:32 -04:00
Cole Robinson
f35438a01b engine: Show error if launching delete dialog fails 2014-04-30 15:54:00 -04:00
Cole Robinson
1f7604b241 engine: More work to fix cascading error dialogs
If a remote network connection stalls, the tick queue becomes backed
up while we wait for the hung connection to continue. While this
happens, the queue is filled up with other requests to poll the hung
connection.

When the connection finally times out, the tick thread closes the
connection via an idle callback. However before that callback gets
a chance to run, all the other poll requests for the dead connection
are processed, all launching their own error dialog.

Mark the connection as 'closing' before conn.close is scheduled, and
use it to short circuit the tick() routine.
2014-04-16 12:29:24 -04:00
Cole Robinson
a398d245cb Clean up pylint integration
- Drop no longer needed disable= bits
- Use string names for all skipped pylint messages
2014-04-02 19:00:24 -04:00
Cole Robinson
ce64d037bf engine: Fix closing connection when tick() fails (bz 1069351) 2014-02-25 15:17:34 -05:00
Cole Robinson
fa6fedd959 engine: Serialize connection autostart (bz 749750)
So polkit/openssh-askpass doesn't spam us
2014-02-01 10:44:45 -05:00
Cole Robinson
ea1b6ae819 virt-manager: Allow domain name or ID for cli options 2014-01-30 11:37:01 -05:00
Cole Robinson
2a34b353da uihelpers: Move browse_local to error.py
It doesn't fit any better, but now it's accessible to all UI classes
more easily.
2014-01-26 18:01:10 -05:00
Cole Robinson
58d5e0b799 uihelpers: Move a few more functions closer to their callers 2014-01-26 17:51:15 -05:00
Cole Robinson
a0c2fdf429 virt-manager: Make --show-domain-creator show the manager as well
Otherwise we don't have any way to close the app.
2014-01-19 12:03:17 -05:00
Martin Kletzander
2b7aa33887 engine: Fix started libvirt daemon requirement
This patch makes virt-manager usable again without systemd (or dbus).
When started without systemd, but with libvirtd properly working,
there was error reported, and virt-manager didn't even try to connect
to the destination.

This patch modifies the behavior in two ways.  When connection is
added with "do_start=False" it will still try to connect, but won't
error out when unsuccessful.  The second modification is that upon
startup, the idle_connect() function will error out only if we failed
starting libvirtd _and_ we couldn't connect to the uri.  So if we
failed starting libvirtd, but could connect, there is no disruption
for the user.
2013-10-29 11:24:52 +01:00
Giuseppe Scrivano
0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.

The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:26 +01:00
Cole Robinson
97f5717ef7 snapshots: Fix showing async dialogs for revert/delete 2013-10-05 10:03:56 -04:00
Cole Robinson
e91cc84770 uihelpers: Add VMActionMenu, share between manager and systray 2013-09-22 15:45:53 -04:00
Cole Robinson
268b462126 uihelpers: Add VMShutdownMenu class
And use it in all the places where we are duplicating a similar menu
2013-09-22 15:45:49 -04:00
Cole Robinson
6869760732 asyncjob: Fix issues with multiple dialogs (bz 1003101)
Basically, drop usage of nested main loops. As has been documented in
other commit messages, we use nested main loops in ways they aren't
supposed to be used. They gave us async behavior that would block
callers, but had weird behavior in some edge cases.

Switch to having async dialogs be 100% async, requiring the user to
pass in a completion callback which is triggered after the async
action is complete.
2013-09-06 21:30:19 -04:00
Cole Robinson
0551d8956b error: Rename confusing sync/async param to modal 2013-09-06 20:16:37 -04:00
Cole Robinson
280663c685 packageutils: Don't implement our own search dialog (bz #746011)
Our search dialog isn't as full featured as packagekits, so just call
out to that. This was originally avoided because it doesn't full
provide the semantics we want, but it's close enough and saves us
from duplicating all their work.
2013-09-01 14:19:23 -04:00
Cole Robinson
7c55cfeb39 virtManager: Drop util, combine it with virtinst.util and uihelpers 2013-08-11 12:39:28 -04:00
Giuseppe Scrivano
ff57d636d7 Drop user back to 'open conn' dialog if connecting fails
In case of connection failure, the user can either maintain the connection
or modify it.

Split up `add_connection_to_ui' into `make_conn' and `register_conn'
to handle separately the object creation and its registration in the
list of connections (ui and conf).

Solves: https://bugzilla.redhat.com/show_bug.cgi?id=617386
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-08-08 14:38:31 -04:00
Leonardo Garcia
40cff67836 virt-manager: Properly handle errors when --show-* options are used.
crobinso: Fix some pylint
2013-07-15 16:03:15 -04:00
Leonardo Garcia
e1be39d986 virt-manager: Code cleanup
Remove functions not necessary or not being used anywhere.
2013-07-15 16:00:37 -04:00
Cole Robinson
fcc82e8f9d virt-manager: Fix --show-* options 2013-07-12 13:10:05 -04:00
Cole Robinson
2ca9e364a5 uihelpers: Drop global error dialog
Just have callers pass one in.
2013-07-09 09:20:43 -04:00
Cole Robinson
5e9e444dec connection: Do non-VM polling on demand
The goal here is to reduce the amount of tick() polling that we do by default.
For things like pools, networks, and interfaces, the constant polling is
not very helpful and causes CPU churn and slowness for remote connections.

Switch to a more on demand style. Pages that want new information for
these objects now request a priority tick that only refreshes the info
we want.

This isn't perfect, but neither was the previous solution in the face of
things like XML updates behind our back. The real solution here is libvirt
event support across the board.
2013-07-07 12:17:54 -04:00
Cole Robinson
149e19da64 connection: Pass nostatsupdate through to VM tick
When kicking off a priority tick, we want to update domain status but not
update stats listing.
2013-07-07 09:42:21 -04:00
Cole Robinson
76887c9a32 engine: Switch tick threading model to use queues
And allow other parts of the API to request a priority tick that is
dispatched from the main tick thread.
2013-07-06 21:24:38 -04:00
Cole Robinson
d427800f11 Share default_uri function 2013-07-06 20:09:18 -04:00
Cole Robinson
c406a6433c VirtualConnection: cache version lookups 2013-07-06 15:39:00 -04:00
Cole Robinson
492a039f7d VirtualConnection: proxy virtinst.support API
Simplifies the lives of callers, and will allow us to do caching later
2013-07-06 12:40:24 -04:00
Cole Robinson
be2d9ddcb4 Add base conn object and bump minimum libvirt version to 0.6.0
This base connection object will be used to simplify the API in various
places, reduce libvirt API calls, and better share code between virtinst
and virt-manager. For now it just centralizes connection opening.

This also exposed various places where our handling for older libvirt
was busted, so raise our minimum host version to 0.6.0, the first
version that supports threaded client requests.
2013-07-05 16:42:19 -04:00
Cole Robinson
57345cd61a Tweak 'libvirt needs to be started' first run message 2013-06-24 12:15:28 -04:00
Cole Robinson
44328b1507 Fix some pylint 2013-06-17 20:17:20 -04:00
Leonardo Garcia
18bf5f508d Add delete VM option in console viewer.
(crobinso: Fix a minor pep8 warning)
2013-06-17 20:07:37 -04:00
Cole Robinson
ea9fadac78 config: Fix changing tick timeout on the fly 2013-06-14 16:22:33 -04:00
Cole Robinson
8914a61689 Fix exiting app if asyncjobs are running 2013-06-14 11:24:52 -04:00
Cole Robinson
1c22ea92df engine: Close packagekit dialog before connecting to libvirt
We are bunching up a slew of hefty operations, split things up a bit
so the UI has a change to catchup.
2013-06-13 17:35:48 -04:00
Cole Robinson
e2435b6d02 asyncjob: Simplify registering a cancel callback 2013-06-13 17:05:33 -04:00
Cole Robinson
5a46e7420a libguestfs: Drop all version checks
Now that virt-manager requires very modern versions of gtk, it's
quite unlikely that we will even run on a system with an old
libguestfs version, so don't bother checking versions.
2013-06-13 16:04:16 -04:00
Cole Robinson
ff297777cc details: Don't traceback if VM deleted with open details window
When a VM is undefined, whether explicitly through virt-manager or behind
our back, we close and cleanup any associated vmmDetails windows. However
there's a race here: if the details window is the last remaining top
level window, cleanup() is called twice which tracebacks.

Fix this by dispatching the exit_app routine in an idle callback, to
avoid racing with any window delete routines.

Reported-by: Leonardo Garcia <lagarcia@br.ibm.com>
2013-06-11 11:02:56 -04:00
Leonardo Garcia
6a1ad46978 Do not show manager window at startup if user requested to show any other window from command line. 2013-05-30 11:25:44 -04:00
Leonardo Garcia
efd5401378 connect_to_uri is not a public method.
connect_to_uri is only called from engine.py.
2013-05-30 11:25:44 -04:00