GNOME Bugzilla – Bug 685044
Gather all kinds of status and logs for easy debugging
Last modified: 2016-03-31 13:58:27 UTC
The properties page should show if an agent is in use or not, and ideally also if a qxl driver is in use (although i'm not sure that is possible atm).
I think we need to to more than that. Ideally we should have a single place you can go to to get all the information you need to help someone debug an issue you have, like: Is there an agent running? What version? What version of the virt guest drivers (qxl, vioser, etc) are running What version of the guest OS is running (linux kernel version, win SP level, etc) Get the logs from various components (qemu,agent,etc)
I think its probably easiest to extend vgagent to do the guest-side data collection.
(In reply to comment #2) > I think its probably easiest to extend vgagent to do the guest-side data > collection. That would need a cooperative and running guest. It's not an approach that would be so reliable, perhaps we should use the same approach as virt-manager, using guestfs (VM overview/applications). Spice-gtk log already has agent presence and capabilities, there is also a property to know when it's running/connected.
(In reply to comment #1) > I think we need to to more than that. Ideally we should have a single place you > can go to to get all the information you need to help someone debug an issue > you have, like: > > Is there an agent running? What version? > What version of the virt guest drivers (qxl, vioser, etc) are running > What version of the guest OS is running (linux kernel version, win SP level, > etc) > Get the logs from various components (qemu,agent,etc) I can see some overlap with what the OVirt guest agent is doing http://www.ovirt.org/w/images/2/20/Ovirt-guest-agent.pdf
I agree that it is a problem what you need to rely on a guest side agent. However, it is pretty robust in the sense that you can easily tell that its not running/working, and then solve that which is generally an easy problem, then you can continue solving the other problems. guestfs strikes me as *very* complicated, requiring parsing of any possible guest-side file format, be it file system, registry, executable format, etc. Additionally these may be extended over time in a way that guestfs doesn't handle. It also seems very risky/racy to try to do such guest side parsing on a running guest.
Created attachment 229562 [details] [review] Allow label less properties I need this later for a property that is essentially just a button.
Created attachment 229563 [details] [review] Add "Troubleshooting log" button to system properties This shows a dialog with a log of troubleshooting data, allowing you to view it, save it or copy it to the clipboard.
Review of attachment 229562 [details] [review]: I assume layout will not be the one you want if you set the label to "" ?
Review of attachment 229562 [details] [review]: Yeah, label "" will indent for the maximum width of any label in the page. I want it left aligned.
Review of attachment 229563 [details] [review]: Looks good, we could also integrate the output of App::run_checks() in this log. ::: src/i-properties-provider.vala @@ -37,3 @@ } - public Property (string description, Gtk.Widget widget, Gtk.Widget? extra_widget) { Don't the changes in this file belong to the previous patch? ::: src/libvirt-machine.vala @@ +326,3 @@ + builder.append_printf ("Domain: %s\n", domain.get_name ()); + builder.append_printf ("UUID: %s\n", domain.get_uuid ()); + builder.append_printf ("Persistent: %s\n", domain.get_persistent () ? _("true") : _("false")); I wouldn't translate 'true' and 'false' here. 'yes'/'no' might be better @@ +356,3 @@ + string data; + FileUtils.get_contents (logfile, out data); + builder.append_printf ("\nQEmu log:\n"); It's spelt QEMU. @@ +357,3 @@ + FileUtils.get_contents (logfile, out data); + builder.append_printf ("\nQEmu log:\n"); + builder.append_printf (_("------------------------------------------------------------") + "\n"); Why the translation marks here? This is the only part of the log thas is marked for translation. ::: src/spice-display.vala @@ +158,3 @@ + if (main_channel != null) { + builder.append_printf ("Spice-gtk version %s\n", Spice.util_get_version_string ()); + builder.append_printf ("Mouse Mode: %s\n", main_channel.mouse_mode == 1 ? "server" : "client"); "Mouse mode" @@ +166,3 @@ + var devs = manager.get_devices (); + for (int i = 0; i < devs.length; i++) { + var dev = devs[i]; Can't we use foreach here? @@ +169,3 @@ + + if (manager.is_device_connected (dev)) + builder.append_printf ("USB Device redirected: %s\n", dev.get_description ("%s %s %s at %d-%d")); "USB device"
Comment on attachment 229562 [details] [review] Allow label less properties Attachment 229562 [details] pushed as eaff26b - Allow label less properties
Review of attachment 229563 [details] [review]: ::: src/i-properties-provider.vala @@ -37,3 @@ } - public Property (string description, Gtk.Widget widget, Gtk.Widget? extra_widget) { Yeah, sorry, splitting it out. ::: src/libvirt-machine.vala @@ +326,3 @@ + builder.append_printf ("Domain: %s\n", domain.get_name ()); + builder.append_printf ("UUID: %s\n", domain.get_uuid ()); + builder.append_printf ("Persistent: %s\n", domain.get_persistent () ? _("true") : _("false")); Yeah, just leftovers from an earlier version that translated stuff. @@ +356,3 @@ + string data; + FileUtils.get_contents (logfile, out data); + builder.append_printf ("\nQEmu log:\n"); ok @@ +357,3 @@ + FileUtils.get_contents (logfile, out data); + builder.append_printf ("\nQEmu log:\n"); + builder.append_printf (_("------------------------------------------------------------") + "\n"); same leftovers here. ::: src/spice-display.vala @@ +158,3 @@ + if (main_channel != null) { + builder.append_printf ("Spice-gtk version %s\n", Spice.util_get_version_string ()); + builder.append_printf ("Mouse Mode: %s\n", main_channel.mouse_mode == 1 ? "server" : "client"); yeah @@ +166,3 @@ + var devs = manager.get_devices (); + for (int i = 0; i < devs.length; i++) { + var dev = devs[i]; no, GPtrArray has no iterator support. @@ +169,3 @@ + + if (manager.is_device_connected (dev)) + builder.append_printf ("USB Device redirected: %s\n", dev.get_description ("%s %s %s at %d-%d")); yeah
Comment on attachment 229563 [details] [review] Add "Troubleshooting log" button to system properties Attachment 229563 [details] pushed as e9af28e - Add "Troubleshooting log" button to system properties
Pushed with fixes. Leaving this open, because i'd like to get more information here: * App::run_checks() output as per above * Spice and agent negotiated capabilities Bunch of stuff we can get from qemu-monitor-command: QXL state (i.e. emulated or has-driver mdoe) (see recent patch on qemu list) QEMU version (info version) kvm status (info kvm) spice status, including server version (info spice) Other would be nice stuff that i don't know how to get atm: * driver versions for qxl, vioser, etc * agent version * guest os * vdagent log
(In reply to comment #14) > Pushed with fixes. Cool. Thanks. > Leaving this open, because i'd like to get more information here: Those would be nice but we have limited resources and with you out of the project, I don't think we have resources to handle those. I'm closing this now unless you want to work on this.