Inform the user of the minimum size/offset granularity

Bug #1663172 reported by Łukasz Zemczak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Image
Fix Released
High
Ł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.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

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

Revision history for this message
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.

Revision history for this message
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
Revision history for this message
Łukasz Zemczak (sil2100) wrote :
Changed in ubuntu-image:
status: Confirmed → In Progress
Barry Warsaw (barry)
Changed in ubuntu-image:
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in ubuntu-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.