Commit Graph

1529 Commits

Author SHA1 Message Date
Cole Robinson 535e34481d libvirtobject: Add is_X object type helpers 2018-10-13 17:23:18 -04:00
Cole Robinson d39b7d1079 details: Fix launching wrong window for duplicate VM name (bz 1630220)
https://bugzilla.redhat.com/show_bug.cgi?id=1630220
2018-10-13 17:16:21 -04:00
Cole Robinson e212ce84e6 installer: extraargs -> extra_args
Better matches what's on the command line
2018-10-13 16:29:32 -04:00
Cole Robinson cec5fdeabe addhardware: Fix some pylint 2018-10-13 15:34:09 -04:00
Cole Robinson a00152d72a manager: fix some --test-leak-debug issues 2018-10-13 14:27:10 -04:00
Cole Robinson 452f5286cd addhardware: Don't show pci-bridge devices
These aren't assignable
2018-10-13 12:38:06 -04:00
Cole Robinson c23a0d4c96 nodedev: add is_linux_root_hub helper
Move the check out of connection.py, and simplify the addhardware
code
2018-10-13 12:18:50 -04:00
Cole Robinson 2482e57a15 create: Fix customize boot page
Installer reworks dropped the guest.autostart flag, need to add
it back. Add Uitest for it
2018-10-13 09:46:06 -04:00
Cole Robinson 11d1cbdf06 installer: DistroInstaller -> InstallerTreeMedia
Now we have only one Installer class, and callers don't need to
worry about choosing a particular class type depending on their
needs, just pass cdrom vs. location to the installer init and
we figure out everything behind the scenes.

Besides simplifying the callers this makes the control flow a
lot easier to follow whether looking at InstallerTreeMedia or
Installer classes
2018-10-13 09:42:11 -04:00
Cole Robinson 286dbf6d51 installer: Fold PXEInstaller into base Installer class
PXEInstaller is really just 'boot off bootdev=network' which is
easy enough to model without a separate class
2018-10-12 15:15:20 -04:00
Cole Robinson 4096800f71 Remove interface UI
Discussed here: https://www.redhat.com/archives/virt-tools-list/2018-October/msg00032.html
2018-10-12 14:38:05 -04:00
Cole Robinson 425f599c84 device: disk: Move all path search handling to diskbackend
Simplify it slightly by combining return output and removing
an entry point. Add some additional test cases for it
2018-10-11 19:11:16 -04:00
Lin Ma 3c44ea8810 addhardware: Add SCSI persistent reservation support for LUN Passthrough
Signed-off-by: Lin Ma <lma@suse.com>
2018-10-11 16:00:28 -04:00
Lin Ma 280b78c96a details: Add SCSI persistent reservation support for LUN Passthrough
It's a common requirement for VMs to send SCSI PR commands in VM cluster
environment. This patch adds the managed mode support of scsi persistent
reservation in details page.

Signed-off-by: Lin Ma <lma@suse.com>
2018-10-11 16:00:28 -04:00
Cole Robinson c83e083dde statsmanager: Skip old CPU stats for offline VM
We will handle any info() calls for status syncinging in domain.tick()
2018-10-10 17:34:21 -04:00
Cole Robinson 3d11cff6e2 statsmanager: Drop self.config prop caching
gsettings/dconf is meant for this usecase, it's fine to hit it
multiple times, we are doing it already anyways with the stats
record checking
2018-10-10 17:25:47 -04:00
Cole Robinson 390adc4e58 module_trace: Support --trace_libvirt=all|mainloop
'all' means log even API calls that are invoked from threads
2018-10-10 17:20:25 -04:00
Cole Robinson 155ddcfc17 conn: Move allstats polling before VM polling
So new VMs already have their stats cached
2018-10-10 17:19:44 -04:00
Cole Robinson a9f9b1be24 statsmanager: Don't run allstats if UI disables all stats 2018-10-10 17:19:32 -04:00
Cole Robinson ac2652a1fa statsmanager: make timestamps more accurate
And reorg our cache of allstats output to be easier to deal
with and not keep virDomain references
2018-10-10 17:19:21 -04:00
Cole Robinson a88a28d0b8 statsmanager: Absorb more domain stats handling 2018-10-10 17:19:21 -04:00
Cole Robinson f553cb67c2 statsmanager: Move VM stats calls back to domain.tick
Otherwise if we hit an error in connect.tick, connection can be
automatically closed in the UI, plus other parts of the code
were implicitly depending on this ordering, like VM rename support
2018-10-10 08:11:25 -04:00
Cole Robinson 5f1acb0c1a statsmanager: clean up
* Absorb support checks from vmmDomain
* Move the allstats handling out of the old wrapper functions
* Misc formatting fixes
2018-10-10 07:35:41 -04:00
Cole Robinson c30c1b8f6d statsmanager: Fix it with LXC
LXC doesn't support allstats API, and there were a number of issues
in that case.
2018-10-10 07:35:41 -04:00
Simon Kobyda 68a5abe279 statsmanager: new class for VM/conn stats polling
Class will work above connection. Right know, it is possible to
provide stats for domains only, but could be expanded.
To retrieve stats, you can use get_vm_stats(vm).

This class uses new virConnectGetAllDomainStats call, which reduces
number of calls needed to poll stats.
Stats are refreshed with every connection tick.

Signed-off-by: Simon Kobyda <skobyda@redhat.com>

(crobinso: squash commits, move statsmanager to its own file,
           fix pylint)
2018-10-10 07:35:37 -04:00
Cole Robinson 88cacb0295 setup: Remove configure --openssh-askpass
For one, we don't offer to install it anymore because we dropped
packagekit stuff. But even having a single package here isn't
really the whole story because different desktops have their
own askpass providers, like Fedora has openssh-askpass for GNOME,
but ksshaskpass for KDE

So drop it all, make the error more generic, and point people
to setting up SSH keys too
2018-10-08 13:59:13 -04:00
Cole Robinson 211ddf3a85 connectauth: polish up the user/pass auth dialog 2018-10-08 13:47:16 -04:00
Cole Robinson efe4f14fc7 connection: Remove krb5 auth dbus check
kerberos+libvirt is sufficiently obscure that I don't expect this
is of much value. Plus I don't have a setup to test
2018-10-08 09:27:22 -04:00
Cole Robinson 368c202f9b systray: Add connection open/close options 2018-10-07 20:16:55 -04:00
Cole Robinson 8a23cda0fe systray: Revive libappindicator usage
In the future, the only option for systray icons is going to
be statusnotifier/libappindicator. statusicon doesn't work on
wayland and gtk4 is dropping the APIs. KDE however is keeping
statusnotifier's around, and ubuntu is maintaining a gnome-shell
plugin to make them work

Revive support, but add a dbus check to make it smarter about
only using libappindicator when there's a listener present.
Better architect the code to separate the differences between
statusicon and libappindicator. Clean up the menu building
2018-10-07 19:52:20 -04:00
Cole Robinson f1d169ad7b setup: Remove configure --{libvirt,kvm}-package-names
This was really only useful with packagekit integration, which
is now gone
2018-10-07 14:27:20 -04:00
Cole Robinson a1d1b4d5a0 engine: Drop PackageKit integration
On first run of the app we will check to see if libvirt and qemu
are installed, and if not, offer to install them. In theory anyways.
In practice this stuff breaks repeatedly and is a pain to test because
every desktop has their own API provider with subtly different behavior.

My last round of testing about 12 months ago: apper on KDE was completely
busted and apparently unmaintained (although that may have changed lately),
gnome-software is the latest packagekit provider on gnome and completely
changes the semantics of the API compared to old style gnome-packagekit
that break a lot of virt-manager assumptions.

So I'm tired of it and want it all gone. Still use systemd to try and
check if libvirtd is running, and provide error messages at startup
to guide people.
2018-10-07 14:24:05 -04:00
Cole Robinson e2352e8518 packageutils: Remove system-config-services dbus
The app is dead and not part of fedora anymore. systemd service
actually provides a polkit dialog nowadays so let's just use
that
2018-10-07 12:41:16 -04:00
Cole Robinson fc8f8d5d7e connect: Drop avahi support
Libvirtd can advertise itself over avahi. The feature is disabled by
default though and in practice I hear of no one actually using it
and frankly I don't think it's all that useful

The 'Open Connection' wizard has a disproportionate amount of code
devoted to this feature, but I don't think it's useful or worth
maintaining, so let's drop it
2018-10-06 20:55:31 -04:00
Cole Robinson 7eaf036acf virtinst: Remove stable_defaults concept
This switch says: if we detect a rhel host, use special version
checks that match rhel backports. This pattern sucks. The way
forward is to have libvirt advertise the bits that are supported,
through domcapabilities. Then virt-manager/virtinst can react
as appropriate.
2018-10-06 19:45:51 -04:00
Cole Robinson 0638e72f1f Remove 'Choose CD', rework details and create media change
The new UI is handled in mediacombo. It's a combobox+entry. The
combobox is prepopulated with host cdrom/floppy devices, and
previously used media paths from gsettings

The new VM wizard no longer has separate UI for cdrom device vs
ISO media. The choosecd dialog is gone all together, and media
is changed with the 'apply' button like all other details changes
2018-10-06 19:37:16 -04:00
Cole Robinson 977a8ced52 addhardware: Fix cdrom icon (bz 1608530) 2018-10-06 13:04:45 -04:00
Cole Robinson c9f0641700 cliconfig: Remove --preferred-distros
It's less relevant with our new search based OS list
2018-10-06 12:33:15 -04:00
Cole Robinson e6738d9827 cliconfig: Remove --default-qemu-user
Libvirt has given us this info in capabilities for a long time,
this shouldn't matter anymore
2018-10-06 12:30:59 -04:00
Cole Robinson 9edca3486a virt-manager: Wire up support for default mode=host-model
Simplify things a long the way
2018-10-04 14:43:44 -04:00
Cole Robinson b807cfa744 details: Handle qemu-xhci as USB3
And fix it in addhardware too
2018-10-04 09:53:36 -04:00
Cole Robinson 8326adb997 oslist: Hide dialog if search field is empty
Behavior here was kinda inconsistent
2018-10-02 10:26:04 -04:00
Cole Robinson f3045b6404 oslist: Expand popover to horizontal size of the search entry
Makes the window more usable by default
2018-10-02 10:26:04 -04:00
Christian Ehrhardt 92c610e782 connection: avoid failing on NoneType in _hostinfo
There is a potential race of a backend to be opened and being true on
self._backend.is_open but self._hostinfo not being set yet.

Avoid spurial bugs due to that by also checking against None before
accessing subelements ot self._hostinfo

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2018-10-01 13:58:52 -04:00
Cole Robinson ff3d6c65d8 Fix some pep8 warnings 2018-10-01 11:37:28 -04:00
Cole Robinson b19f94299b details: Add OS name view/edit, + oslist rework
This is just a big nasty commit.

Turn the OS inspection page into an always available page that
shows the libosinfo name from the domain metadata XML. Use oslist.py
and have it absorb more of the common behavior needed by create.py
and details.py. Add UI tests for it all
2018-09-30 20:55:32 -04:00
Cole Robinson 75c64151b1 engine: Exit app if if --show-X bits fail
We were missing some cases. Simplify the code while we are at it
and add some extra ui test cases
2018-09-30 20:55:18 -04:00
Cole Robinson 627bfabc32 pylint: Silence output on Fedora 29 2018-09-29 14:27:34 -04:00
Cole Robinson a741f595ea guest: Drop update_defaults
Fold its one purpose into the UEFI setting bits, fix it and test it
2018-09-13 15:59:27 -04:00
Cole Robinson 6063538750 guest: Replace os_variant with set_os_name
And have callers directly access osinfo.name if they need it
2018-09-12 17:24:28 -04:00