Commit Graph

137 Commits

Author SHA1 Message Date
Cole Robinson
77423e7a8d connection: catch more errors in filter_nodedevs (bug 1225771)
https://bugzilla.redhat.com/show_bug.cgi?id=1225771 Has an example of
libvirt failing to generate nodedev XML, so handle that too.
2015-06-09 11:41:39 -04:00
Cole Robinson
68908c2d81 connection: Handle nodedevs disappearing in filter_nodedevs (bz 1225545)
Not exactly sure how we end up with a nodedev in the list that doesn't
have cached XML, but whatever
2015-06-06 14:21:05 -04:00
Giuseppe Scrivano
2c1e482b2d virt-manager: fix --show-host-summary error windows flooding
Break an endless loop vmmHost.overview_name_changed ->
vmmHost.conn_state_changed -> vmmHost._overview_name_changed.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-11 20:20:10 +02:00
Cole Robinson
88e18c86d3 connection: Fix sending net-removed signal 2015-05-07 12:30:28 -04:00
Cole Robinson
cb0eaf23d8 conn/domain: Privatize stats list 2015-05-04 18:42:17 -04:00
Cole Robinson
fbf841151d conn/domain: Condense the internal stats APIs 2015-05-04 18:05:54 -04:00
Cole Robinson
892e13d2c0 connection: Tweak pretty names a bit 2015-05-02 19:20:18 -04:00
Ján Tomko
be7611b645 connection: refresh domain XML on device hotplug
Listen to the VIR_DOMAIN_EVENT_ID_DEVICE_ADDED event
too, added by libvirt 1.2.15.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2015-04-29 09:52:10 -04:00
Cole Robinson
62ad0e91ee migrate: Big reworking of the dialog
It's largely the same, but now

- The code is better organized
- The UI is much more streamlined, only showing relevant fields when
  required.
- We warn about the hostname/URI cases that we know libvirt will error on
- Drop some of the attempts at being smart, and just mimic what libvirt
  will do.
2015-04-21 17:15:58 -04:00
Cole Robinson
6dbe19bd83 libvirtobject: Fix deleting a running VM
The recent XML rework wasn't catching when a domain disappears while
trying to refresh it's state from the event loop.
2015-04-13 18:24:46 -04:00
Cole Robinson
10ad151d4b connection: Clarify tick functions and who should use them 2015-04-13 16:56:46 -04:00
Cole Robinson
e9495110ca connection: Refresh XML for every libvirt object event
We tried to split up status vs XML refreshing, but they are tied together
in various ways (like the runtime XML changes when a VM starts). This
was breaking console connecting when starting a VM
2015-04-11 17:24:30 -04:00
Cole Robinson
839ce682b1 Drop support for non-managed save/restore
All major drivers either support it, or don't support save at all,
so I think we can safely drop it. If people still need it they can
get by with virsh.
2015-04-11 13:52:48 -04:00
Cole Robinson
3d2afbaf6f connection: Allow setting a custom 'pretty name' (bz 784701)
We've had multiple requests over the years for something similar. People
might have to connect to multiple IP addresses, or really large hostnames,
that become difficult to distinguish in the UI.

Add a field in the host details page that allows setting a custom name,
and store it in gsettings.
2015-04-11 13:39:25 -04:00
Cole Robinson
4781ad6cd6 connection: Simplify manager row 'pretty name' handling
Unify all the callers, and use some UI ellipsizing to handle
crazy long hostnames.

This drops the conn name collision prevention stuff which can be
useful when you have lots of similar connection names. But upcoming
patches will make it mostly redundant.
2015-04-11 12:57:32 -04:00
Cole Robinson
fc171fc31d connection: Bunch of minor tweaks handling TCP URIs 2015-04-11 12:08:57 -04:00
Cole Robinson
8c107f87f9 host: Remove some redudant conn details
And some minor UI spacing fixes
2015-04-11 11:29:03 -04:00
Cole Robinson
42648f45f0 libvirtobject: Clean up XML invalidation
Make sure we aren't invalidating things when we are using events. Don't
overload APIs so much.
2015-04-10 17:50:06 -04:00
Cole Robinson
d0ffd954cd connection: Unify initial object refresh handling
Have libvirtobjects advertise a routine specifically for initial setup,
and emit a signal when it's complete. Then dispatch the associated conn
signal on demand as the objects are initialized. This should avoid a
whole class of ordering issues, and is easier to follow IMO.
2015-04-10 15:00:42 -04:00
Cole Robinson
629627b663 connection: Drop unused open() argument 2015-04-10 15:00:34 -04:00
Cole Robinson
838baf6946 connection: tick: Operate on combined object lists
Makes the flow a bit simpler, and allows us to break out polling without
having to pass around a ton of lists.
2015-04-10 15:00:34 -04:00
Cole Robinson
5357b91402 connection: Store all object lists in an external class
Simplifies list management and allows us to use real locking to prevent
list collisions.
2015-04-10 15:00:34 -04:00
Cole Robinson
2d25c920ea connection: Use consistent nodedev function names 2015-04-10 15:00:34 -04:00
Cole Robinson
cb5d075f50 libvirtobject: Unify a few APIs and conn tick handling 2015-04-10 15:00:34 -04:00
Cole Robinson
4933cf7600 libvirtobject: Clarify force_update_status 2015-04-10 15:00:34 -04:00
Cole Robinson
a3f8d73a9c libvirtobject: Unify internal status APIs and signals
Drop config-changes vs. status-changed and just use one signal, since they
are largely the same code paths for all users.
2015-04-10 15:00:34 -04:00
Cole Robinson
01bf07ba11 libvirtobject: Unify status signals
Dispatch them all from the actual object and not proxied through
the connection. Use the same signal name for all objects with the same
signature.
2015-04-10 15:00:33 -04:00
Cole Robinson
fb7a921ec4 storagelist: Select newly created pool/volumes
And clean up some of the internal APIs in this area
2015-04-10 15:00:33 -04:00
Cole Robinson
c66bc2a87f connection: Have get_nodedevs return vmmNodeDevice
To make it consistent with similar vmmConnection functionas
2015-04-07 14:12:00 -04:00
Cole Robinson
ebfb0cd726 mediadev: Kill the abstraction, just use nodedevs
It's really a useless hold over from the days when we manually talked
to HAL.

One semi useful bit lost in the shuffle is the option to repoll cdroms
for media. But since virt-manager allows attaching a device to the
VM regardless of whether it notices media change, this plumbing is
really overkill. If libvirt ever grows nodedev events we will get this
much easier.
2015-04-07 13:59:43 -04:00
Cole Robinson
f5b13a6e19 Drop all references to xenner, it's long dead 2015-04-03 16:45:43 -04:00
Cole Robinson
d4dfbd41b5 capabilities: Use XMLBuilder for cpu_map parsing
And clean up the internal bits a little
2015-04-03 16:45:43 -04:00
Cole Robinson
cac4ac1401 capabilities: Switch to use XMLBuilder
Just a cleanup to finally unify all the XML objects around the same
API, and drop a bunch of old cruft.
2015-04-03 16:45:42 -04:00
Cole Robinson
ce74cd7726 connection: Protect conn state tick() updates with a lock
If the mainloop is backed up, tick_send_signals might not run before
another conn.tick call is scheduled by the tick thread. conn.tick would
then be operating on incorrect self._vms since it was never updated.

Don't run another tick() until tick_send_signals has released a lock.

https://www.redhat.com/archives/virt-tools-list/2015-April/msg00009.html

Reported-by: Charles Arnold <carnold@suse.com>
2015-04-02 14:05:56 -04:00
Giuseppe Scrivano
64264e8fa2 Disable domain events with XEN
When XEN is used, disable domain events and use polling.

On RHEL-5.9 virDomainInfo() seems to not report correctly the domain
status when called immediately after the event is received.

Solves: https://bugzilla.redhat.com/show_bug.cgi?id=1177207

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-26 11:08:57 +01:00
Giuseppe Scrivano
7b630c00a0 Move stable_defaults from vmmConnection to VirtualConnection
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-24 17:44:23 +01:00
Cole Robinson
cff08223ba util: Move uri_split to its own URISplit class
Does what uri_split did, but wraps it all up in an object that makes
handling the data easier, and makes it easy to extend.
2014-12-09 08:43:19 -05:00
Cole Robinson
66a8c5d374 vmm: conn: Don't abuse path_definitely_exists for pool refreshing
Just catch any errors and continue on
2014-12-04 20:39:27 -05:00
Cole Robinson
6489df83ca devicedisk: Rename path_exists -> path_definitely_exists
Since it's a best effort attempt, try to make it more clear that
we aren't certain if paths exist in some cases.
2014-12-04 20:10:37 -05:00
Giuseppe Scrivano
c9a04c23dc virtManager: show correctly IPv6 addresses
VirtualConnection.get_uri_host_port already splits this information
taking care of IPv6 addresses, do not split it again.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-20 15:51:16 +01:00
Cole Robinson
0717a21f65 host: Fix renaming network/storage pool 2014-09-20 17:32:09 -04:00
Cole Robinson
38738d9fa6 connection: Don't close VM dialog on rename
Rework things a bit to simplify everything we pass around.

The specific bug fix is making sure we update the object list in place,
otherwise the event loop detects it as the VM being deleted and closes
the details window.
2014-09-20 17:32:09 -04:00
Cole Robinson
ea97325a72 connection: Tweak some debugging output 2014-09-20 16:33:26 -04:00
Cole Robinson
dd67c48233 connection: Handle nodedev polling too
And cleanup up a bunch of nodedev functions as a result
2014-09-20 12:04:49 -04:00
Cole Robinson
226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Cole Robinson
76bc8e5ab9 connection: Do initial object refreshes in a thread
None of these objects are urgent, and this allows us to split up the
initial API calls to be more parallel.
2014-09-12 16:28:37 -04:00
Cole Robinson
37e0f16c8b connection: Simplifying connection error tracking 2014-09-12 16:28:37 -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
d1c22b3b2c storagepool: Don't default to refreshing volume list
This needlessly hits the network too much. The places where it's
important to have up to date info will either manually call pool
refresh, or give the user an refresh button.
2014-09-12 16:28:37 -04:00
Cole Robinson
92835f205f connection: Cache x86 cpu values at connection time 2014-09-12 16:28:37 -04:00