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.
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.
- 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
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.
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.
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.
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.
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.
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>
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.
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>
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.
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.