"Unsafe swap space detected" dialog displayed too late if swap is created after an encrypted partition and makes manual partitioner unusable

Bug #1056707 reported by Jean-Baptiste Lallement on 2012-09-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
partman-crypto (Ubuntu)
High
Dimitri John Ledkov
Quantal
High
Dimitri John Ledkov
ubiquity (Ubuntu)
High
Dimitri John Ledkov
Quantal
High
Dimitri John Ledkov

Bug Description

Quantal Desktop 20120926

In the manual partitioner, if the user creates the swap space after the encrypted space then installation starts and the "Unsafe swap space detected" dialog is shown during the timezone step. When the dialog is dismissed, it brings the user back to the guided partitioner not the manual partitioner.

Then, if I use the manual partitioner again, it is unusable, all the actions are greyed, only 'Change' is enabled but does nothing

In the guided partioner, If I select 'Erase everything' then installation stops on error with a dialog titled 'ERROR!!!' "'/dev/sdaX' device or resource busy."

The dialog should be displayed when the user creates the swap space and the manual partitioner should allow to fix the mistake.

TEST CASE:
1. Start Ubiquity and go to the manual partitioner
2. Create a new partition table
3. Add a partition of type "physical volume for encryption" and do not allocate all disk space, enter a passphrase and press 'ok'
4. Select the newly created partition and mount it on '/'
5. Select the free space and create a partition of type 'ext4', mounted on '/boot' and keep free space for a swap partition.
6. Select the free space and create a partition of type 'swap space'
7. Press 'Install Now'

ACTUAL RESULT:
Installation continues, proceeds to the timezone step and the stops with a dialog 'Unsafe swap space detected'
Installation is completely blocked because the partition is not released and cannot be reused.

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1056707

tags: added: iso-testing
tags: added: testcase
Changed in ubiquity (Ubuntu Quantal):
status: New → Triaged
importance: Undecided → High
Dimitri John Ledkov (xnox) wrote :

we really should do all checks we can before continuing with the rest of the install.
my proposal is to run that check again before continuing to the next page.

Options:
* run 'activate encrypted partitions' again upon clicking "install now". This has side effect that partman decides to create the encrypted file system, before coming back to partitioning menu.
* add "check swap" menu command to partman-crypto and push that before continuing.
* make partman run "unecrypted swap" check after adding swap partition straight away.
* better yet, do not offer to create unencrypted swap, if any encrypted volumes are active.

Colin Watson (cjwatson) wrote :

You'll need to check if it works, of course, but my recommendation would be to move the unsafe_swap script in partman-crypto from commit.d to check.d. That's where most checks of this kind belong, but the check.d facility is newer than much of the rest of partman so it isn't used quite everywhere it should be.

It's possible that you may have to rearrange unsafe_swap a little bit to deal with checking the disk layout that's about to be committed rather than whatever's currently on disk. I haven't read through it in enough detail to be sure about this.

tags: removed: rls-q-incoming
Guy Stone (stoneguy3) wrote :

Please make sure eventual solution also addresses Bug #1044475, another encryption/swap issue. Guess it'll apply to Ubiquity now.

Dimitri John Ledkov (xnox) wrote :

@Guy Stone
This bug is completely different from bug #1044475 although about the same piece of functionality. But thank you for bringing bug #1044475 to my attention.

Steve Langasek (vorlon) on 2012-09-28
Changed in ubiquity (Ubuntu Quantal):
assignee: nobody → Dmitrijs Ledkovs (xnox)
Changed in partman-crypto (Ubuntu Quantal):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Dmitrijs Ledkovs (xnox)
Changed in partman-crypto (Ubuntu Quantal):
status: Triaged → Fix Committed
Changed in ubiquity (Ubuntu Quantal):
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-crypto - 54ubuntu2

---------------
partman-crypto (54ubuntu2) quantal; urgency=low

  * Move unsafe_swap checks from commit.d to check.d (LP: #1056707)
 -- Dmitrijs Ledkovs <email address hidden> Mon, 01 Oct 2012 10:30:35 +0100

Changed in partman-crypto (Ubuntu Quantal):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.12.7

---------------
ubiquity (2.12.7) quantal; urgency=low

  [ Dmitrijs Ledkovs ]
  * Change calculate_reuse_option logic to allow upgrading development
    releases to final/newer. (LP: #1050562)
  * Automatic update of included source packages: partman-auto
    103ubuntu2 (LP: #1050562), partman-crypto 54ubuntu2. (LP: #1056707)

  [ Colin Watson ]
  * Use xz compression for binary packages.
 -- Dmitrijs Ledkovs <email address hidden> Fri, 28 Sep 2012 14:21:13 +0100

Changed in ubiquity (Ubuntu Quantal):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers