Inform the user of the minimum size/offset granularity

Bug #1663172 reported by Łukasz Zemczak on 2017-02-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Image
Łukasz Zemczak

Bug Description

After switching to using pyparted for our partitioning, we gained some more fine grained control on size and offsets of each partition. That being said, we are still bound by the device sector size - so all sizes and offsets need to be multiply of the sector size (512 bytes by default). The parser should issue a warning (or error) whenever the size/offset of a partition is not a multiply of the sector size and rounding will have to be done.

Łukasz Zemczak (sil2100) wrote :

The question is now: should we issue a warning, or an error?

Barry Warsaw (barry) wrote :

One way I've been thinking about error vs. warning for u-i is how much work will be thrown away if we error out. If we've already called prepare-image to download the snaps, then erroring out throws all that work away (along with all the download latency). So post prepare-image, I tend to want to warn only. The bogus setting can be overridden by something that makes more sense. Before prepare-image then errors are more useful.

That said, if we can't override with something sensible, then it makes sense to error even after prepare-image.

Barry Warsaw (barry) wrote :

Another thought (for another bug/branch): we could introduce a --strict mode so that even post prepare-image warnings are turned into errors.

Changed in ubuntu-image:
milestone: none → 0.15
importance: Undecided → High
status: New → Confirmed
Łukasz Zemczak (sil2100) wrote :
Changed in ubuntu-image:
status: Confirmed → In Progress
Barry Warsaw (barry) on 2017-02-14
Changed in ubuntu-image:
status: In Progress → Fix Committed
Barry Warsaw (barry) on 2017-02-15
Changed in ubuntu-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers