trivial: provide a little more context for disk size failures

While trying to build a new CI job, I came to realize that the
default image was too small, and the block-device-efi-lvm element
example wants 40GB by default.

Even though that can be easily resolved, it kind of requires taking
a look at the code to understand what is going on. So instead,
we'll now log an error as a hint.

Change-Id: I05bfeae1a2b9aef01f781115fdbd5046c80437f0
This commit is contained in:
Julia Kreger 2024-10-02 13:03:18 -07:00
parent 527f049a31
commit 3a69f8d4b7

View File

@ -152,6 +152,9 @@ class Partitioning(PluginBase):
# megabytes so it can align on sensible boundaries. And # megabytes so it can align on sensible boundaries. And
# create partitions right after previous so no need to # create partitions right after previous so no need to
# calculate start/end - just size. # calculate start/end - just size.
if not size <= disk_free:
logger.error('The requested size of the image is smaller '
'than the block device configuration.')
assert size <= disk_free assert size <= disk_free
args['size'] = size // (1024 * 1024) args['size'] = size // (1024 * 1024)