gadget.yaml should specify disk/volume image sizing behavior

Bug #1633141 reported by Barry Warsaw
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Image
New
Wishlist
Unassigned
snapd
Triaged
Wishlist
Unassigned

Bug Description

Currently, ubuntu-image calculates how big a volume/disk because there's no way to specify the intended size in the gadget.yaml. For images booted on physical devices, cloud images, and MAAS, the resulting disk.img is automatically resized on first boot. This is a good thing because it allows us to create smaller images without nul padding.

But this is problematic for other images such as kvm disks because the automatic resizing won't happen there. In cases like this, we need to be able to specify the final size of the disk image exactly.

In the short term, LP: #1632085 was added to provide an optional `--image-size` cli argument to ubuntu-image which would override the calculated size and generate a disk image of exactly the given size, as long as that was greater than the calculated size (a smaller --image-size is ignored).

Both the intended disk image size and the first boot resizing behavior should be specifiable in the gadget.yaml so authors can explicitly describe how their images should work. This bug tracks this RFE.

Long thread which starts here:

https://lists.snapcraft.io/archives/devices/2016-October/000087.html

Relevant messages in the thread:

https://lists.snapcraft.io/archives/devices/2016-October/000128.html
https://lists.snapcraft.io/archives/devices/2016-October/000130.html
https://lists.snapcraft.io/archives/devices/2016-October/000117.html

Barry Warsaw (barry)
Changed in ubuntu-image:
importance: Undecided → Wishlist
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Assigning to Maciek for evaluation. This bug is fairly old and perhaps is no longer relevant.

affects: snappy → snapd
Changed in snapd:
status: New → Triaged
assignee: nobody → Maciej Borzecki (maciek-borzecki)
Changed in snapd:
assignee: Maciej Borzecki (maciek-borzecki) → nobody
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.