Commit Graph

82 Commits

Author SHA1 Message Date
Cole Robinson 7fcdd61920 manager: Expand logic to avoid colliding connection descriptions
And drop some unused code
2014-07-04 18:20:54 -04:00
Cole Robinson aa823b5b58 connection: Handle unsupport KeepAlive (like test URIs) 2014-07-04 18:20:54 -04:00
Cole Robinson e12d7a6a8c connection: Report error if things fall over during connection bring up 2014-07-04 18:20:54 -04:00
Cole Robinson f66c4ef3e4 connection: Fix error reporting if TCP creds dialog fails 2014-07-04 18:20:54 -04:00
Giuseppe Scrivano 538c68a41d virt-manager: check if still connected every 20 seconds
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-07-02 15:31:40 +02:00
Cole Robinson c78974c0d9 connection: Drop netdev abstraction
Just open code it in the one place it's needed. Try to simplify some of
the netlist logic while we are at it. Should fix:

https://bugzilla.redhat.com/show_bug.cgi?id=1109574
2014-06-18 12:41:36 -04: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 42204c9379 connection: Add debug helper to disable libvirt events 2014-06-02 12:02:09 -04:00
Cole Robinson 519e3b5768 connection: Log when objects are added/removed 2014-05-31 13:52:13 -04:00
Cole Robinson 5c28a00d3e connection: Call path_exists before getting storage volume (bz 1092739)
path_exists will check to ensure the volume actually survives a pool
refresh, incase it was deleted behind libvirt's back. This makes the
delete dialog happier at least.
2014-04-30 16:00:34 -04:00
Cole Robinson d4c27baa45 connection: Mark a few bits as private 2014-04-16 12:29:24 -04:00
Cole Robinson 873c22d19a connection: Avoid some useless errors when connection closes
- Run the connection
- Restart libvirtd, connection is auto closed
- Re-run the connection
- Manually stop it, see errors in the logs about unknown event IDs

We need to unconditionally clear our event ID list
2014-04-16 12:29:24 -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 adf3545671 connection: Hook into domain balloon event (bz 1081424) 2014-03-31 12:43:49 -04:00
Cole Robinson 565ef4f3ef connection: Make sure a DEFINED event forces a config-change signal
Even if XML didn't change. This is what we do in the non-event case.
Makes it more clear if details->apply triggers a define, but our
change didn't stick for any reason.
2014-03-22 18:14:43 -04:00
Cole Robinson 8562c3258e More pylint fixes 2014-03-22 11:21:19 -04:00
Cole Robinson 081e34715f connection: Handle errors when deregistering events on close (bz 1069351)
Otherwise this interrupts the close/cleanup routine, and the connection
never appears to disconnect in the UI. This causes error dialog spamming
when libvirtd goes down.
2014-03-10 09:35:35 -04:00
Cole Robinson df7012a68b Handle libvirt generating invalid volume XML (bz 1072770) 2014-03-06 12:04:08 -05:00
Cole Robinson f67df11701 vmm connection: Handle missing storage volumes (bz 1070883)
Similar to what was done in a808bd6692
for the virtinst connection wrapper.
2014-02-27 13:16:21 -05:00
Cole Robinson 88538f916d connection: Actually fix domain event deregister 2014-02-14 10:00:45 -05:00
Cole Robinson 3f27bc1bd1 connection: Fix race when updating conn.vms
We update the canonical conn.vms list in an idle callback, so any parts
of the main UI thread won't see the conn.vms change while they are
iterating over it.

Problem with this, is that if multiple ticks() are scheduled before
the first idle handler has a chance to run, we can overwrite the VM
list can fail to be correctly updated.

Fix this by only updating 'vms' if it actually changed.
2014-02-13 11:17:14 -05:00
Cole Robinson 7aecd1a9b8 connection: Fix deregisterevent tracebacks on app close 2014-02-11 16:26:15 -05:00
Cole Robinson e0381cc970 connection: Deregister event callbacks on close 2014-02-11 15:45:04 -05:00
Cole Robinson 4442f1f9be Use network lifecycle events if available
This just allows us to be more reactive to network lifecycle changes.
2014-02-11 15:45:04 -05:00
Cole Robinson c7cd6ca2d3 Use libvirt events for domain lifecycle tracking (bz 836703)
When events were successfully registered, we skip the VM listing on
every tick, and instead trigger a manual refresh whenever a VM event
is received. Not as efficient as it should be, but saves us a lot of
API calls.
2014-02-11 15:45:04 -05:00
Cole Robinson 21fb072d4a virt-install: Default to qcow2 for new images
Following along with virt-manager's change. It has all the features and
good enough performace, and is easy enough to override for people that
care.
2014-02-10 18:47:58 -05:00
Cole Robinson 032dd0cf21 clone: Show destination host if on a remote connection (bz 881099) 2014-02-01 18:59:10 -05:00
Cole Robinson 021ffd17e2 domain: Stop using UPDATE_CPU xml flag
Now that feature UI is gone, it doesn't do us any good. And actually
can cause issues if changing from host-model to a static model.
2014-01-31 10:48:45 -05:00
Cole Robinson 0a77093cbc console: Handle ipv6 addresses (bz 974126) 2014-01-29 11:02:54 -05:00
Cole Robinson 58d5e0b799 uihelpers: Move a few more functions closer to their callers 2014-01-26 17:51:15 -05:00
Martin Kletzander dc0b9bbaaf Rename hide_unsupported_rhel_options to stable_defaults and clean-up its usage
There were multiple problems with the setting and usage of
hide_unsupported_rhel_options.  Due to the fact that the option has
several diferent namings throughout the code, this patch is renaming
it to stable_defaults, which basically says what the option does and
makes it possible to use it without need for more than one negation
(where the old code had up to 4 of them in some places), which also
helps understanding it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-01-21 17:13:18 +01:00
Cole Robinson 7f66926721 Fix first time remote URL installs from virt-manager (bz 1049852)
On first run, the remote URL install handling creates a storage pool
for /var/lib/libvirt/boot on the remote host. After this, it clears
the VirtualConnection's object cache, so the next time all pools are
fetched, it returns an accurate list.

However that clear_cache call wasn't propagated up to virt-manager's
cache. Add a new cb to fix it.
2014-01-18 14:57:39 -05:00
Cole Robinson eb33bd34e7 Misc improvements to some debug messages 2013-11-09 18:17:29 -05:00
Giuseppe Scrivano 5798c5b9b4 virt-manager: prefer os.makedirs to os.mkdir when creating cache dir
Ensure the parent directories exist when attempting to create the
cache directory.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1016435

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-11-05 18:15:11 +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 56b9f6187b Streamline support checks
Just use one function check_support
2013-10-06 10:08:04 -04:00
Cole Robinson 89646fe841 addhw: Filter root hubs out of USB device list 2013-10-05 14:40:38 -04:00
Cole Robinson a2cbb9f500 support: s/CONN_HV/CONN/g
We don't need to distinguish these days.
2013-10-02 16:41:23 -04:00
Cole Robinson 9194feb1f5 virt-manager: Default to qcow2 on kvm
qcow2 enables fancy features like snapshots and is generally more
desktopy, which we purport to be.

We only do this on not horribly old libvirt/qemu, and only on qemu
connections. This may work for xen but I'm not going to turn it on
until someone tests it.
2013-10-02 15:34:34 -04:00
Cole Robinson 868fbd9fc9 snapshots: Add screenshot support
Show a screenshot in the 'new snapshot' wizard. If we successfully create
that snapshot, save the screenshot in

~/.cache/virt-manager/$connuri/$vmuuid/snap-screenshot-$snapname.$ext

And show it in the snapshot details overview. We don't do any reaping
on snapshot delete, vm delete, etc, but that could be added later.
2013-10-01 10:14:51 -04:00
Cole Robinson 844a567e7b details: Don't silently drop managed save when renaming VM
Instead just error about it. Until there's an actual libvirt 'rename'
API we can't do much better than that.
2013-09-30 15:38:35 -04:00
Cole Robinson 98a95b2e2d network: Add install() command, remove function from vmmConnection
This is the pattern used by other virtinst objects
2013-09-30 15:38:34 -04:00
Cole Robinson 8f0bfb1ad6 host: Allow renaming a storage pool 2013-09-29 12:28:01 -04:00
Cole Robinson 369a17160a host: Allow renaming virtual networks 2013-09-29 12:14:00 -04:00
Cole Robinson cd7837bc4b domain: Clean up some support checks
We don't need to cache things since virtinst/connection does it for
us.
2013-09-29 09:58:31 -04:00
Cole Robinson 72058f2bbf support: Remove unused nodedev support checks 2013-09-29 09:19:56 -04:00
Cole Robinson 7a5dc7c544 devicedisk: path_in_use_by: Check backing stores as well
Plumb through a fetch_all_vols helper for this, and do all the
caching bits.
2013-09-28 21:07:18 -04:00
Cole Robinson a7b1414dc5 libvirtobject: Make parseclass non-optional
All libvirtobject child classes have an associated XMLBuilder now, so
make it mandatory.
2013-09-23 08:34:50 -04:00
Cole Robinson aff0ddb259 Use XMLBuilder for Storage object handling
Simplify the API a bunch while we are at it, add tests, etc.
2013-09-20 10:00:08 -04:00