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 682300 - Track & show installation progress
Track & show installation progress
Status: RESOLVED WONTFIX
Product: gnome-boxes
Classification: Applications
Component: installer
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
: 679107 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-08-20 20:50 UTC by Zeeshan Ali
Modified: 2016-03-31 13:55 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
vm-creator: Start under-installation domain (1.66 KB, patch)
2012-08-20 20:50 UTC, Zeeshan Ali
committed Details | Review
Make Machine.info be a public automatic property (3.53 KB, patch)
2012-08-20 20:50 UTC, Zeeshan Ali
needs-work Details | Review
installer-media: Add installed_size property (2.77 KB, patch)
2012-08-20 20:51 UTC, Zeeshan Ali
committed Details | Review
vm-creator: Track & show installation progress (5.46 KB, patch)
2012-08-20 20:51 UTC, Zeeshan Ali
none Details | Review
vm-creator: Track & show installation progress (5.48 KB, patch)
2012-08-20 23:48 UTC, Zeeshan Ali
needs-work Details | Review
Make Machine.info be a public automatic property (3.86 KB, patch)
2012-08-21 13:16 UTC, Zeeshan Ali
committed Details | Review
vm-creator: Track & show installation progress (5.69 KB, patch)
2012-08-21 13:18 UTC, Zeeshan Ali
committed Details | Review
Use ngettext to tranlate "%d%% installed" (1.03 KB, patch)
2012-08-27 10:58 UTC, Christophe Fergeau
none Details | Review
Use ngettext to tranlate "%d%% installed" (1.02 KB, patch)
2012-08-27 15:50 UTC, Christophe Fergeau
none Details | Review
Use ngettext to translate "%d%% installed" (1.04 KB, patch)
2012-08-27 15:51 UTC, Christophe Fergeau
committed Details | Review
installer: Drop all install size assumptions (2.76 KB, patch)
2012-08-31 17:16 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2012-08-20 20:50:50 UTC
Here is the first implementation of showing to user some progress of the installation. It works pretty well from what I can tell from my testing so far, athough i kept changing the code so I might have broken something after last test (which was just an hour ago). I will run more tests while I get a review..
Comment 1 Zeeshan Ali 2012-08-20 20:50:52 UTC
Created attachment 221913 [details] [review]
vm-creator: Start under-installation domain

When domain is still under installation at shutdown, its most probably
because we ask libvirt to shutdown on guest reboot (to activate the new
configuration).
Comment 2 Zeeshan Ali 2012-08-20 20:50:57 UTC
Created attachment 221914 [details] [review]
Make Machine.info be a public automatic property

This means that now LibvirtMachine sets this property appropriately.
Comment 3 Zeeshan Ali 2012-08-20 20:51:00 UTC
Created attachment 221915 [details] [review]
installer-media: Add installed_size property

It represents the storage allocation of the OS immediately after
installation. We only know the value of this property for express
installations. This information should really come from libosinfo and
hopefully it soon will be, along with the rest of the OS-specific express
installation code/data.
Comment 4 Zeeshan Ali 2012-08-20 20:51:03 UTC
Created attachment 221916 [details] [review]
vm-creator: Track & show installation progress

Its completely based on us knowing the guest disk usage after
installation and we only know that in case of express installation. We
do the same for non-express installations and live VMs.

Another limitation is that we lose track of installations if user quits
boxes in btw installation.

On the bright side, we now have a more reliable way of knowing when
installation is really complete for express installs.
Comment 5 Zeeshan Ali 2012-08-20 23:48:28 UTC
Created attachment 221941 [details] [review]
vm-creator: Track & show installation progress

V2: A small change needed when patch from bug#682311 is applied to avoid a crash. W/o patch from bug#682311, we don't get rid of "Installing.." string in the UI.
Comment 6 Marc-Andre Lureau 2012-08-21 11:57:50 UTC
Review of attachment 221914 [details] [review]:

::: src/vm-creator.vala
@@ +22,3 @@
+        else
+            machine.info = _("Live");
+

it would make more sense to factor this in a seperate update_info() to avoid logic and strings duplication
Comment 7 Marc-Andre Lureau 2012-08-21 12:03:14 UTC
Review of attachment 221915 [details] [review]:

ack
Comment 8 Marc-Andre Lureau 2012-08-21 12:06:40 UTC
Review of attachment 221941 [details] [review]:

::: src/vm-creator.vala
@@ +213,3 @@
+        GVir.StorageVolInfo volume_info;
+        try {
+            volume_info = volume.get_info ();

I guess we want to make that call async, since we do it regularly. otherwise, it may freeze UI intermitently...
Comment 9 Zeeshan Ali 2012-08-21 12:11:29 UTC
(In reply to comment #8)
> Review of attachment 221941 [details] [review]:
> 
> ::: src/vm-creator.vala
> @@ +213,3 @@
> +        GVir.StorageVolInfo volume_info;
> +        try {
> +            volume_info = volume.get_info ();
> 
> I guess we want to make that call async, since we do it regularly. otherwise,
> it may freeze UI intermitently...

Yeah but this will require changes to libvirt-glib and we'll have to dump dep again. Since Daniel release it yesterday on a quick notice for us, I don't dare to ask him to rush in another release. :) Could we live with sync for now?
Comment 10 Marc-Andre Lureau 2012-08-21 12:20:08 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Review of attachment 221941 [details] [review] [details]:
> > 
> > ::: src/vm-creator.vala
> > @@ +213,3 @@
> > +        GVir.StorageVolInfo volume_info;
> > +        try {
> > +            volume_info = volume.get_info ();
> > 
> > I guess we want to make that call async, since we do it regularly. otherwise,
> > it may freeze UI intermitently...
> 
> Yeah but this will require changes to libvirt-glib and we'll have to dump dep
> again. Since Daniel release it yesterday on a quick notice for us, I don't dare
> to ask him to rush in another release. :) Could we live with sync for now?

you can use run_in_thread() in the meantime, we already do that
Comment 11 Zeeshan Ali 2012-08-21 13:16:37 UTC
Created attachment 221990 [details] [review]
Make Machine.info be a public automatic property

V2: Factored out some code in update_machine_info().
Comment 12 Zeeshan Ali 2012-08-21 13:18:09 UTC
Created attachment 221991 [details] [review]
vm-creator: Track & show installation progress

V2:

* The periodic calls to get_progress are now done async.
* Reduced margin of error to better suit Fedora 17.
Comment 13 Christophe Fergeau 2012-08-27 10:46:05 UTC
These patches got in, didn't they? Just confused by the patch status.

I've played a bit with this today (winxp/win7 installations), and it's quite easy to get to 100% while the installation is still in progress by using non-English ISOs, or using different Windows versions (ultimate, professional, home, ...). When this happens, I've seen the 'Installing' label disappear early in one case, and I've also seen it replace the '100% Installed' label in another case (I think).

I've also been able to finish an installation while Boxes thinks it's only at 65% (en_windows_7_professional_n_with_sp1_x86_dvd_u_677328.iso). In this case, the "65% Installed" label stays there, and the completion percentage grows as you use the VM (ie as more disk space is used), and ultimately disappears if the disk grows big enough.

Getting this to work nicely in a majority of cases probably means adding lots of missing data to libosinfo...
Comment 14 Christophe Fergeau 2012-08-27 10:58:01 UTC
Created attachment 222524 [details] [review]
Use ngettext to tranlate "%d%% installed"

'installed' is invariant in English, but this is not necessarily true
in other languages, so it's better to use ngettext to translate it.
This also changes the initial 'I' of 'Installed' to be lower case.

This will need approval for breaking the string freeze.
Comment 15 Christophe Fergeau 2012-08-27 12:48:49 UTC
Review of attachment 221915 [details] [review]:

::: src/fedora-installer.vala
@@ +4,3 @@
+    public override uint64 installed_size {
+        get {
+            return express_install? 2922930176 : 0;

A comment explaining where this value is coming from would have been nice.
Comment 16 Christophe Fergeau 2012-08-27 15:50:26 UTC
Created attachment 222562 [details] [review]
Use ngettext to tranlate "%d%% installed"

'installed' is invariant in English, but this is not necessarily true
in other languages, so it's better to use ngettext to translate it.
This also changes the initial 'I' of 'Installed' to be lower case.
Comment 17 Christophe Fergeau 2012-08-27 15:51:20 UTC
Created attachment 222563 [details] [review]
Use ngettext to translate "%d%% installed"

'installed' is invariant in English, but this is not necessarily true
in other languages, so it's better to use ngettext to translate this
string.
This commit also changes the initial 'I' of 'Installed' to be
lower case.
Comment 18 Zeeshan Ali 2012-08-27 17:05:53 UTC
(In reply to comment #17)
> Created an attachment (id=222563) [details] [review]
> Use ngettext to translate "%d%% installed"
> 
> 'installed' is invariant in English, but this is not necessarily true
> in other languages, so it's better to use ngettext to translate this
> string.

ACK for this part of the change.

> This commit also changes the initial 'I' of 'Installed' to be
> lower case.

Its capital in the design mockup so I kept it this way. Ask mccann as both a designer and native english speaker? :)
Comment 19 Zeeshan Ali 2012-08-27 17:21:21 UTC
(In reply to comment #13)
> These patches got in, didn't they? Just confused by the patch status.

Yikes, I guess git bz failed to make changes and I didn't notice. Fixed now.

> I've played a bit with this today (winxp/win7 installations), and it's quite
> easy to get to 100% while the installation is still in progress by using
> non-English ISOs, or using different Windows versions (ultimate, professional,
> home, ...). When this happens, I've seen the 'Installing' label disappear early
> in one case, and I've also seen it replace the '100% Installed' label in
> another case (I think).

The plan is to get this property from libosinfo but it will have to be based on the new automated installer APIs as the installed size is usually dependent what you choose during installation and automated install is the only thing that can know that. One important detailed I missed when I came-up with this plan (and now noticed, thanks to you) was that  install size is also dependent on the installer media being used so need to think how the libosinfo API/XML will look like now.

> I've also been able to finish an installation while Boxes thinks it's only at
> 65% (en_windows_7_professional_n_with_sp1_x86_dvd_u_677328.iso). In this case,
> the "65% Installed" label stays there, and the completion percentage grows as
> you use the VM (ie as more disk space is used), and ultimately disappears if
> the disk grows big enough.

I think this is a bigger issue than the one above. We can work around this in Boxes by having a timeout: if install percentage doesn't increase for a while, we assume installation is done!

> Getting this to work nicely in a majority of cases probably means adding lots
> of missing data to libosinfo...

Sure but once the needed APIs are in place in libosinfo, we'll only assume the correct installed size or not at all.
Comment 20 Zeeshan Ali 2012-08-27 17:25:00 UTC
(In reply to comment #15)
> Review of attachment 221915 [details] [review]:
> 
> ::: src/fedora-installer.vala
> @@ +4,3 @@
> +    public override uint64 installed_size {
> +        get {
> +            return express_install? 2922930176 : 0;
> 
> A comment explaining where this value is coming from would have been nice.

Sorry, was in a bit of a hurry because of feature freeze. I got it from Fedora-17-x86_64-DVD.iso.
Comment 21 Christophe Fergeau 2012-08-27 17:26:36 UTC
(In reply to comment #19)
> 
> Sure but once the needed APIs are in place in libosinfo, we'll only assume the
> correct installed size or not at all.

Any ETA on that? Imo until we get this API we shouldn't try to display a percentage except for a few whitelisted ISOs where we know the data is accurate, otherwise this will look weird/buggy.
Comment 22 Christophe Fergeau 2012-08-27 17:36:05 UTC
(In reply to comment #20)
> (In reply to comment #15)
> > Review of attachment 221915 [details] [review] [details]:
> > 
> > ::: src/fedora-installer.vala
> > @@ +4,3 @@
> > +    public override uint64 installed_size {
> > +        get {
> > +            return express_install? 2922930176 : 0;
> > 
> > A comment explaining where this value is coming from would have been nice.
> 
> Sorry, was in a bit of a hurry because of feature freeze. I got it from
> Fedora-17-x86_64-DVD.iso.

I mean, if this value is wrong for some reason, how can I compute it myself? Same question for the windows values actually.
Comment 23 Zeeshan Ali 2012-08-27 17:53:35 UTC
(In reply to comment #21)
> (In reply to comment #19)
> > 
> > Sure but once the needed APIs are in place in libosinfo, we'll only assume the
> > correct installed size or not at all.
> 
> Any ETA on that? Imo until we get this API we shouldn't try to display a
> percentage except for a few whitelisted ISOs where we know the data is
> accurate, otherwise this will look weird/buggy.

If i fail to fix it this week, we'll remove the hard-coded values but we should keep rest of the code, especially the strings so there is a possiblity to get the feature back into 3.6 without breaking freezes.
Comment 24 Zeeshan Ali 2012-08-27 17:58:06 UTC
(In reply to comment #22)
> (In reply to comment #20)
> > (In reply to comment #15)
> > > Review of attachment 221915 [details] [review] [details] [details]:
> > > 
> > > ::: src/fedora-installer.vala
> > > @@ +4,3 @@
> > > +    public override uint64 installed_size {
> > > +        get {
> > > +            return express_install? 2922930176 : 0;
> > > 
> > > A comment explaining where this value is coming from would have been nice.
> > 
> > Sorry, was in a bit of a hurry because of feature freeze. I got it from
> > Fedora-17-x86_64-DVD.iso.
> 
> I mean, if this value is wrong for some reason, how can I compute it myself?
> Same question for the windows values actually.

Immediately after installation is done, do `virsh vol-info NAME`. Oh, and i had a local virsh hack to make it display the whole value: http://fpaste.org/bzoU/
Comment 25 Christophe Fergeau 2012-08-27 19:02:25 UTC
(In reply to comment #23)
> (In reply to comment #21)
> > (In reply to comment #19)
> > > 
> > > Sure but once the needed APIs are in place in libosinfo, we'll only assume the
> > > correct installed size or not at all.
> > 
> > Any ETA on that? Imo until we get this API we shouldn't try to display a
> > percentage except for a few whitelisted ISOs where we know the data is
> > accurate, otherwise this will look weird/buggy.
> 
> If i fail to fix it this week, we'll remove the hard-coded values but we should
> keep rest of the code, especially the strings so there is a possiblity to get
> the feature back into 3.6 without breaking freezes.

I didn't advocate removing any code, just disabling it in most cases
Comment 26 Christophe Fergeau 2012-08-28 12:45:34 UTC
Attachment 222563 [details] pushed as f183878 - Use ngettext to translate "%d%% installed"
Comment 27 Christophe Fergeau 2012-08-28 12:47:42 UTC
I've changed installed to Installed and pushed this patch since it wasn't obvious which string we want to display when I discussed this with mccann on IRC
Comment 28 Christophe Fergeau 2012-08-29 09:25:47 UTC
Closed this by mistake I think (git bz..)
Comment 29 Zeeshan Ali 2012-08-31 17:16:46 UTC
Created attachment 223094 [details] [review]
installer: Drop all install size assumptions

Turns out this informtion is not only dependent on the OS and our
control over the installer but also on the exact media and architecture
as well.
Comment 30 Christophe Fergeau 2012-08-31 17:30:52 UTC
Comment on attachment 223094 [details] [review]
installer: Drop all install size assumptions

looks good
Comment 31 Zeeshan Ali 2012-08-31 17:40:15 UTC
Comment on attachment 223094 [details] [review]
installer: Drop all install size assumptions

Attachment 223094 [details] pushed as a5b457f - installer: Drop all install size assumptions
Comment 32 Christophe Fergeau 2012-09-12 08:45:34 UTC
*** Bug 679107 has been marked as a duplicate of this bug. ***
Comment 33 Alexander Larsson 2012-10-09 11:58:52 UTC
I'm pretty skeptical about the possibility of this ever being truly reliable. It just depends on so many details that we don't control, like the exact version of the OS installer, the arch, decisions done at runtime, installation of not-on-iso data like updates, etc, etc.

And I also don't think showing a non-ideal percentage completed value is all that useful to the user (the *only* really useful thing would be to know how long the install would take, and this measure doesn't really give us that).
Comment 34 Zeeshan Ali 2013-03-01 01:24:02 UTC
I guess we can give up on this one now.
Comment 35 Zeeshan Ali 2014-03-12 01:54:10 UTC
Bumped into some related research about this and seems I was right all along:

"People didn’t mind so much if it was inaccurate,” Myers says. “They still preferred the progress bar to not having anything at all.”

http://mobile.nytimes.com/2014/03/09/magazine/who-made-that-progress-bar.html?_r=1

Based on this I would really want to bring this back. I recall at least mccann agreed with me about this assertion.
Comment 36 Zeeshan Ali 2014-03-19 15:56:29 UTC
Lesson: Should stay away from bugzilla when even slightly intoxicated and tired. :) The last comment still makes a lot of sense though, only that we have no good (even remotely reliable) way to track installation.