After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685044 - Gather all kinds of status and logs for easy debugging
Gather all kinds of status and logs for easy debugging
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks: 696727
 
 
Reported: 2012-09-28 13:45 UTC by Alexander Larsson
Modified: 2016-03-31 13:58 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
Allow label less properties (2.28 KB, patch)
2012-11-21 10:51 UTC, Alexander Larsson
committed Details | Review
Add "Troubleshooting log" button to system properties (10.37 KB, patch)
2012-11-21 10:51 UTC, Alexander Larsson
committed Details | Review

Description Alexander Larsson 2012-09-28 13:45:43 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).
Comment 1 Alexander Larsson 2012-10-24 10:34:32 UTC
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)
Comment 2 Alexander Larsson 2012-10-24 10:41:36 UTC
I think its probably easiest to extend vgagent to do the guest-side data collection.
Comment 3 Marc-Andre Lureau 2012-10-24 10:51:17 UTC
(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.
Comment 4 Christophe Fergeau 2012-10-24 11:28:45 UTC
(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
Comment 5 Alexander Larsson 2012-10-25 09:03:00 UTC
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.
Comment 6 Alexander Larsson 2012-11-21 10:51:48 UTC
Created attachment 229562 [details] [review]
Allow label less properties

I need this later for a property that is essentially just a button.
Comment 7 Alexander Larsson 2012-11-21 10:51:55 UTC
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.
Comment 8 Christophe Fergeau 2012-11-21 12:42:20 UTC
Review of attachment 229562 [details] [review]:

I assume layout will not be the one you want if you set the label to "" ?
Comment 9 Alexander Larsson 2012-11-21 12:52:05 UTC
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.
Comment 10 Christophe Fergeau 2012-11-21 12:58:13 UTC
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 11 Alexander Larsson 2012-11-21 13:06:45 UTC
Comment on attachment 229562 [details] [review]
Allow label less properties

Attachment 229562 [details] pushed as eaff26b - Allow label less properties
Comment 12 Alexander Larsson 2012-11-22 09:38:18 UTC
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 13 Alexander Larsson 2012-11-22 09:38:31 UTC
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
Comment 14 Alexander Larsson 2012-11-22 09:43:31 UTC
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
Comment 15 Zeeshan Ali 2014-10-15 23:26:59 UTC
(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.