Feature #15282

Add a prompt right before applying an IUK

Added by anonym 2018-02-05 15:56:00 . Updated 2018-12-16 13:24:35 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Installation
Target version:
Start date:
2018-02-05
Due date:
% Done:

100%

Feature Branch:
bugfix/14754-partially-applied-upgrades, iuk:bugfix/14754-partially-applied-upgrades
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Upgrader
Deliverable for:

Description

Downloading an IUK can take a long time (up to hours) so users will likely use Tails for other purposes meanwhile. However, the current behavior is to abruptly disable the network as soon as the IUK is downloaded, possibly breaking work for them.

Therefore we should add a prompt after the download. It should make it clear that once you close the prompt, the network is cut. I think it would be good that it also encouraged users to close all applications they have started to free some RAM for the IUK installation.


Files

before (1173 B) sajolida, 2018-02-16 15:27:45
after (1085 B) sajolida, 2018-02-16 15:27:45

Subtasks


Related issues

Related to Tails - Bug #14754: Partially applied incremental upgrades cause all kinds of trouble Confirmed 2019-03-21
Blocks Tails - Feature #15506: Core work 2018Q4: Foundations Team Resolved 2018-04-08

History

#1 Updated by anonym 2018-02-05 15:56:27

  • blocks Feature #15281: Stack one single SquashFS diff when upgrading added

#2 Updated by intrigeri 2018-02-06 15:38:16

  • blocked by deleted (Feature #15281: Stack one single SquashFS diff when upgrading)

#3 Updated by intrigeri 2018-02-06 15:38:21

#4 Updated by intrigeri 2018-02-06 17:51:33

FTR the chances I do that in time for 3.6 are very slim.

#5 Updated by intrigeri 2018-02-16 10:38:37

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 10
  • Feature Branch set to iuk:feature/15282-prompt-before-disabling-network

Passes the iuk’s own test suite. I’ve not tried these changes in a running Tails, I’ll do that thanks to the Tails integration test suite once it has been updated. I’ll ask sajolida to review/improve the new strings but that should not block anonym from updating the test suite so we can check if it works there.

#6 Updated by intrigeri 2018-02-16 10:39:03

  • blocked by Feature #15286: Adapt automated test suite for the "one single SquashFS diff" upgrade scheme added

#7 Updated by intrigeri 2018-02-16 10:41:51

sajolida, the new dialog says:

  • title: “Upgrade successfully downloaded”; I’m not sure about that since we actually want to say at least 2 other things in this dialog
  • text: “The upgrade was successfully downloaded.\n\nThe network connection will now be shut down and your Tails device will be upgraded.\n\nPlease save your work and close all other applications.”
  • interaction: only an “OK” button, i.e. zenity --info, as we don’t support cancelling an upgrade process that’s been started already

Improvements welcome :)

#8 Updated by intrigeri 2018-02-16 13:24:04

  • Feature Branch changed from iuk:feature/15282-prompt-before-disabling-network to iuk:feature/15281-single-squashfs-diff

#9 Updated by intrigeri 2018-02-16 13:24:22

  • Assignee changed from intrigeri to anonym
  • QA Check set to Ready for QA

#10 Updated by sajolida 2018-02-16 15:28:37

Your proposition

Upgrade successfully downloaded
===============================

The upgrade was successfully downloaded.

The network connection will now be shut down and your Tails device will be upgraded.

Please save your work and close all other applications.

[ Ok ]

My proposition:

Upgrade successfully downloaded
===============================

The upgrade was successfully downloaded.

The network connection will now be disabled.

Please save your work and close all other applications.

[ Apply upgrade ]
  • We already say “disabled” in other dialogs.
  • I replaced “your Tails device will be upgraded” by an explicit button. I see that we already have custom “Ok” button in Frontend.pm
  • I think your title is fine, or at least I couldn’t find anything better.

I also propose 2 changes to the first dialog (“New version available”):

  • Remove “The networking will be disabled after downloading the upgrade.” so we get rid of some unclear reference to a future event. We now have a dialog just for that.
  • Change “[Ok]” into “[Upgrade]” to have an explicit button.

For the record, I’m attaching the wordings of the whole serie of dialog, before and after my proposals.

#11 Updated by intrigeri 2018-02-17 07:47:40

  • Assignee changed from anonym to intrigeri
  • QA Check changed from Ready for QA to Dev Needed

Thanks sajolida!

#12 Updated by intrigeri 2018-02-17 08:35:20

  • Assignee changed from intrigeri to anonym
  • % Done changed from 10 to 20
  • QA Check changed from Dev Needed to Ready for QA

sajolida wrote:
> My proposition:

Implemented! anonym, please import the new diff, adjust the test suite as needed and let me know if it still works :)

> I also propose 2 changes to the first dialog (“New version available”):

I think there’s some confusion going on: the “New version available” dialog is only displayed when there’s a new version available that one cannot upgrade to automatically. The two proposals below don’t make sense in that context, but they apply just fine to the “Upgrade available” dialog, so I’ll assume you’re talking about that one instead. I guess you’ve tried to reverse-engineer this set of dialogs by reading the source code and not by running it (which is definitely a nice way to save time in many cases :)

> * Remove “The networking will be disabled after downloading the upgrade.” so we get rid of some unclear reference to a future event. We now have a dialog just for that.

Yay, done!

> * Change “[Ok]” into “[Upgrade]” to have an explicit button.

The “Upgrade available” dialog has two buttons, none of which is “OK”:

  • “Upgrade now” (equivalent of OK, proceeds with downloading the upgrade)
  • “Upgrade later” (equivalent of Cancel, closes the Upgrader and that’s it)

Now that you know what you’re patching, do you still want to change the wording?

#13 Updated by anonym 2018-02-22 16:29:30

intrigeri wrote:
> sajolida wrote:
> > My proposition:
>
> Implemented! anonym, please import the new diff, adjust the test suite as needed and let me know if it still works :)

I rather avoid tedious work like bumping test suite images until we have the final formulation.

#14 Updated by anonym 2018-02-22 16:29:48

  • Assignee changed from anonym to sajolida
  • QA Check changed from Ready for QA to Info Needed

#15 Updated by sajolida 2018-02-23 12:04:21

  • Assignee changed from sajolida to anonym
  • QA Check changed from Info Needed to Ready for QA

Oops, indeed, reverse engineering the dialogs lead to mixed up strings.

I checked your branch and it’s exactly what I want!

#16 Updated by anonym 2018-02-24 11:41:29

  • Assignee changed from anonym to intrigeri
  • QA Check changed from Ready for QA to Info Needed

So I’ve imported the recent iuk changes and now the check always fails with: “Could not determine whether an upgrade is available from our website”

/usr/share/perl5/Tails/IUK/Frontend.pm line 188

But I am confused: last week I imported (commit:a3537f893c41e8b6f7ae9af8ac95d6f28e633c6d) the previous iteration (that added the prompt and stopped removing kernel+initrd) and successfully tested (i.e. didn’t get the above error) it and even updated (commit:6e6798b5d037ac41012b08f786c488884c19c88a) the automated test suite, which also worked fine. But now even even my old build from that commit that worked results in the above error. I’ll investigate this further.

However, I barely know how to debug tails-iuk. intrigeri, do you have some suggestions on how to proceed? Stack trace? Some how to know where the original error occurs? Or is it easier if you have a look?

#17 Updated by anonym 2018-02-24 12:36:49

  • Assignee changed from intrigeri to anonym
  • QA Check changed from Info Needed to Ready for QA

anonym wrote:
> /usr/share/perl5/Tails/IUK/Frontend.pm line 188

Eh, that line does not belong here.

#18 Updated by anonym 2018-02-24 13:14:57

  • Assignee changed from anonym to intrigeri
  • QA Check changed from Ready for QA to Info Needed

#19 Updated by intrigeri 2018-02-24 14:31:11

  • Assignee changed from intrigeri to anonym
  • QA Check changed from Info Needed to Ready for QA

Running tails-upgrade-frontend-wrapper by hand in a Terminal I see:
Does not match running system at /usr/bin/tails-iuk-get-upgrade-description-file line 18.

I think that’s because our UDFs for 3.6 are missing the initial-install-version field: https://git-tails.immerda.ch/iuk/tree/lib/Tails/IUK/UpgradeDescriptionFile/Download.pm?h=feature/15281-single-squashfs-diff#n88

Note that the UDFs you’ve created for our automated tests have it so I’m curious to know if these tests pass (running them right now locally since the build of the branch was broken for a few days on Jenkins so we have no recent results there).

#20 Updated by intrigeri 2018-02-24 14:46:31

  • QA Check changed from Ready for QA to Dev Needed

Indeed, I think my hunch was correct: the automated test works just fine until FindFailed: TailsUpgraderOkButton.png.

#21 Updated by intrigeri 2018-02-24 14:46:52

  • QA Check changed from Dev Needed to Ready for QA

#22 Updated by anonym 2018-02-26 16:17:04

  • Assignee changed from anonym to intrigeri
  • QA Check changed from Ready for QA to Dev Needed

intrigeri wrote:
> Running tails-upgrade-frontend-wrapper by hand in a Terminal I see:
> Does not match running system at /usr/bin/tails-iuk-get-upgrade-description-file line 18.
>
> I think that’s because our UDFs for 3.6 are missing the initial-install-version field: https://git-tails.immerda.ch/iuk/tree/lib/Tails/IUK/UpgradeDescriptionFile/Download.pm?h=feature/15281-single-squashfs-diff#n88

Note that I am talking about the automated tests, all three scenarios, and not the automatic check that indeed probably fails in all other scenarios. Sorry for being unclear!

> Note that the UDFs you’ve created for our automated tests have it so I’m curious to know if these tests pass (running them right now locally since the build of the branch was broken for a few days on Jenkins so we have no recent results there).

So what I said in Feature #15282#note-16 is about the tests, so I’ll just reassign back to you.

#23 Updated by intrigeri 2018-02-27 08:39:51

  • Assignee changed from intrigeri to anonym
  • % Done changed from 20 to 10
  • QA Check changed from Dev Needed to Ready for QA

First of all, I don’t see the behaviour you’re reporting on Jenkins, e.g. on https://jenkins.tails.boum.org/view/Tails_ISO/job/test_Tails_ISO_feature-15281-single-squashfs-diff/5/ the check for upgrades works just fine.

I’ve tested this manually anyway because there’s already been enough confusion on this ticket. I’ve built an ISO from the topic branch, started it in a VM (from DVD), opened a root terminal where I’ve run:

cat > /tmp/fake-os-release <<EOF
TAILS_PRODUCT_NAME="Tails"
TAILS_VERSION_ID="2.0~test"
EOF
chmod a+r /tmp/fake-os-release
mount --bind /tmp/fake-os-release /lib/live/mount/rootfs/filesystem.squashfs/etc/os-release

Then I’ve run tails-upgrade-frontend-wrapper as amnesia and I see a “New version available” dialog that tells me “You should do a manual upgrade to Tails 2.3~test”, as intended.

So if there’s really a bug in my code, please tell me how exactly how I can reproduce it, because I’m lost. I suspect that you’ve run the tests that you’ve seen failing at a time when our website was down or something :)

#24 Updated by intrigeri 2018-03-02 08:22:59

  • Target version changed from Tails_3.6 to Tails_3.7

#25 Updated by intrigeri 2018-03-28 09:22:58

  • Target version changed from Tails_3.7 to Tails_3.8

#26 Updated by intrigeri 2018-05-25 13:28:36

  • Target version changed from Tails_3.8 to Tails_3.10.1

#27 Updated by intrigeri 2018-06-28 20:57:58

  • Target version changed from Tails_3.10.1 to Tails_3.11

#28 Updated by intrigeri 2018-09-12 06:34:40

  • Assignee changed from anonym to intrigeri

#29 Updated by intrigeri 2018-09-12 06:34:56

#30 Updated by intrigeri 2018-11-05 14:43:29

  • Target version changed from Tails_3.11 to Tails_3.12

#31 Updated by intrigeri 2018-11-06 15:04:46

  • Target version changed from Tails_3.12 to Tails_3.13

#32 Updated by intrigeri 2018-11-20 07:48:41

  • related to Bug #14754: Partially applied incremental upgrades cause all kinds of trouble added

#33 Updated by intrigeri 2018-11-20 07:57:19

  • Target version changed from Tails_3.13 to Tails_3.11
  • QA Check changed from Ready for QA to Dev Needed

I’ll give this a try while working on Feature #14574 in order to save QA time and cost of context switches. To decouple this work from Feature #15281, the relevant commits are 9b718cf561df2f3422246f2ca556119a3788670f, 69b7b562a8ab579d1f45c5ea983f3d3716b7de36, 4f19c141c7458687109d78656bdcea7c839ecbc2, and 1d2cb5e53e0efeab5ae2d0401d117187adab40b4.

#34 Updated by intrigeri 2018-11-20 10:56:18

  • Feature Branch changed from iuk:feature/15281-single-squashfs-diff to iuk:bugfix/14574-partially-applied-upgrades

#35 Updated by intrigeri 2018-11-20 17:22:32

  • Assignee changed from intrigeri to sajolida
  • QA Check changed from Dev Needed to Ready for QA

See Bug #14754#note-35

#36 Updated by intrigeri 2018-12-08 17:59:24

  • Assignee changed from sajolida to anonym
  • Feature Branch changed from iuk:bugfix/14574-partially-applied-upgrades to bugfix/14754-partially-applied-upgrades, iuk:bugfix/14754-partially-applied-upgrades

Same as Bug #14754#note-39.

#37 Updated by intrigeri 2018-12-08 17:59:43

  • blocks deleted (Feature #15286: Adapt automated test suite for the "one single SquashFS diff" upgrade scheme)

#38 Updated by anonym 2018-12-09 11:03:02

  • % Done changed from 10 to 30

Looks good (see: Bug #16145#note-43)!

#39 Updated by anonym 2018-12-09 11:13:10

  • Assignee changed from anonym to intrigeri
  • QA Check changed from Ready for QA to Dev Needed

#40 Updated by intrigeri 2018-12-09 13:19:28

  • Status changed from In Progress to Fix committed
  • % Done changed from 30 to 100

Applied in changeset commit:tails|1a742b7ab25a5b1ac5855dee68cff1b8b9fbfff1.

#41 Updated by intrigeri 2018-12-09 13:23:06

  • Assignee deleted (intrigeri)
  • QA Check changed from Dev Needed to Pass

#42 Updated by CyrilBrulebois 2018-12-16 13:24:35

  • Status changed from Fix committed to Resolved