Merge "trivial: provide a little more context for disk size failures"

This commit is contained in:
Zuul 2024-10-15 02:35:09 +00:00 committed by Gerrit Code Review
commit 3b8f61524a

View File

@ -152,6 +152,9 @@ class Partitioning(PluginBase):
# megabytes so it can align on sensible boundaries. And
# create partitions right after previous so no need to
# 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
args['size'] = size // (1024 * 1024)