Project

General

Profile

Feature #15282

Feature #15281: Stack one single SquashFS diff when upgrading

Add a prompt right before applying an IUK

Added by anonym 9 months ago. Updated about 1 month ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
Installation
Target version:
Start date:
02/05/2018
Due date:
% Done:

10%

QA Check:
Ready for QA
Feature Branch:
iuk:feature/15281-single-squashfs-diff
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Upgrader

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.

before (1.15 KB) sajolida, 02/16/2018 03:27 PM

after (1.06 KB) sajolida, 02/16/2018 03:27 PM


Related issues

Blocked by Tails - Feature #15286: Adapt automated test suite for the "one single SquashFS diff" upgrade scheme In Progress 02/05/2018
Blocks Tails - Feature #15506: Core work 2018Q4: Foundations Team Confirmed 04/08/2018

Associated revisions

Revision a3537f89 (diff)
Added by anonym 8 months ago

Import new snapshot of tails-iuk for #15281 and #15282.

For #15281 we should now not remove kernel+initrd from ./live, and the
prompt for #15282 has been added.

Refs: #15281, #15282

Revision 6e6798b5 (diff)
Added by anonym 8 months ago

Test suite: adapt Upgrader tests vs "download complete" prompt.

Refs: #15282

Revision b581f35d (diff)
Added by anonym 8 months ago

Import new snapshot of tails-iuk for #15282.

The strings for the prompt have now been finalized.

Will-fix: #15282

History

#1 Updated by anonym 9 months ago

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

#2 Updated by intrigeri 9 months ago

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

#3 Updated by intrigeri 9 months ago

  • Parent task set to #15281

#4 Updated by intrigeri 9 months ago

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

#5 Updated by intrigeri 8 months ago

  • 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 8 months ago

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

#7 Updated by intrigeri 8 months ago

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: "<b>The upgrade was successfully downloaded.</b>\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 8 months ago

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

#9 Updated by intrigeri 8 months ago

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

#10 Updated by sajolida 8 months ago

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 8 months ago

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

Thanks sajolida!

#12 Updated by intrigeri 8 months ago

  • 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 8 months ago

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 8 months ago

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

#15 Updated by sajolida 8 months ago

  • 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 8 months ago

  • 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: "<b><b>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 (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 (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 8 months ago

  • 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 8 months ago

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

#19 Updated by intrigeri 8 months ago

  • 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 8 months ago

  • 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 8 months ago

  • QA Check changed from Dev Needed to Ready for QA

#22 Updated by anonym 8 months ago

  • 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 #15282#note-16 is about the tests, so I'll just reassign back to you.

#23 Updated by intrigeri 8 months ago

  • 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 8 months ago

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

#25 Updated by intrigeri 7 months ago

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

#26 Updated by intrigeri 5 months ago

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

#27 Updated by intrigeri 4 months ago

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

#28 Updated by intrigeri about 1 month ago

  • Assignee changed from anonym to intrigeri

#29 Updated by intrigeri about 1 month ago

Also available in: Atom PDF