RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2141738 - Image builder fails with Volume group "XXX" has insufficient free space (975 extents): 977 required.
Summary: Image builder fails with Volume group "XXX" has insufficient free space (975 ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: osbuild-composer
Version: 8.7
Hardware: All
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Image Builder team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-10 16:35 UTC by jcastran
Modified: 2023-05-16 09:28 UTC (History)
4 users (show)

Fixed In Version: osbuild-composer-69-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 08:27:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github osbuild osbuild-composer pull 3137 0 None open disk: align LVM2 volumes to the extent size 2022-11-15 18:22:53 UTC
Red Hat Issue Tracker RHELPLAN-139051 0 None None None 2022-11-10 16:55:38 UTC
Red Hat Product Errata RHSA-2023:2780 0 None None None 2023-05-16 08:28:23 UTC

Description jcastran 2022-11-10 16:35:30 UTC
Description of problem:
Locally hosted Image builder is miscalculating the size of the Volume Group needed resulting in not enough extents for an image to be built.

Version-Release number of selected component (if applicable):
osbuild-composer-62-3.el8_7.x86_64

How reproducible:
Everytime

Steps to Reproduce:
1. Use blueprint attached
2. composer-cli compose start BLUEPRINT vmdk
3.

Actual results:
LVM2: using vg name '7ace2e05-f05a-4b0e-9c2c-ca16e32dfd89'
  Physical volume "/dev/loop0" successfully created.
  Volume group "7ace2e05-f05a-4b0e-9c2c-ca16e32dfd89" successfully created
  Rounding up size to full physical extent 29.80 GiB
  WARNING: Logical volume 7ace2e05-f05a-4b0e-9c2c-ca16e32dfd89/rootlv not zeroed.
  Logical volume "rootlv" created.
  Rounding up size to full physical extent <3.82 GiB
  WARNING: Logical volume 7ace2e05-f05a-4b0e-9c2c-ca16e32dfd89/varlv not zeroed.
  Logical volume "varlv" created.
  Rounding up size to full physical extent <3.82 GiB
  WARNING: Logical volume 7ace2e05-f05a-4b0e-9c2c-ca16e32dfd89/var_loglv not zeroed.
  Logical volume "var_loglv" created.
  Rounding up size to full physical extent <3.82 GiB
  WARNING: Logical volume 7ace2e05-f05a-4b0e-9c2c-ca16e32dfd89/var_tmplv not zeroed.
  Logical volume "var_tmplv" created.
  Rounding up size to full physical extent <3.82 GiB
  Volume group "7ace2e05-f05a-4b0e-9c2c-ca16e32dfd89" has insufficient free space (975 extents): 977 required.
Traceback (most recent call last):
  File "/run/osbuild/bin/org.osbuild.lvm2.create", line 112, in <module>
    ret = main(args["devices"], args["options"])
  File "/run/osbuild/bin/org.osbuild.lvm2.create", line 107, in main
    subprocess.run(cmd, encoding='utf-8', check=True)
  File "/usr/lib64/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['lvcreate', '-an', '--size', '4096786432B', '-n', 'var_log_auditlv', '7ace2e05-f05a-4b0e-9c2c-ca16e32dfd89']' returned non-zero exit status 5.

Additional info:
This did not fail on console.redhat.com/insights/ where I specified size by MB, not bytes

Comment 2 Tomáš Hozza 2022-11-11 10:12:03 UTC
Thanks for the report.

I was able to reproduce the issue using the attached blueprint...

Comment 4 Ondřej Budai 2022-11-14 09:36:43 UTC
Image Builder on RHEL also supports different units than bytes:

[[customizations.filesystem]]
mountpoint = "/"
size = "32 GiB"

[[customizations.filesystem]]
mountpoint = "/var"
size = "4 GiB"

[[customizations.filesystem]]
mountpoint = "/var/log"
size = "4 GiB"

[[customizations.filesystem]]
mountpoint = "/var/tmp"
size = "4 GiB"

[[customizations.filesystem]]
mountpoint = "/var/log/audit"
size = "4 GiB"

Composer has some issues with rounding extents, so this should help. Can you try that?

Comment 5 Christian Kellner 2022-11-18 18:36:03 UTC
PR #3137 is merged upstream.

Comment 8 Tomáš Hozza 2022-12-13 17:21:47 UTC
Fixed in osbuild-composer-69-1.el8

Comment 13 Alexander Todorov 2023-02-14 14:22:43 UTC
# rpm -q osbuild-composer 
osbuild-composer-46.1-1.el8.x86_64

# composer-cli compose start RHEL8-VMWare-CIS vmdk
Compose b538a417-e0ee-41ce-9247-0230a8b3f8fb added to the queue

# composer-cli compose status 
b538a417-e0ee-41ce-9247-0230a8b3f8fb FAILED   Tue Feb 14 08:58:00 2023 RHEL8-VMWare-CIS 0.0.1 vmdk  

Traceback from comment #0 confirmed.



After upgrade:

# rpm -q osbuild-composer
osbuild-composer-73-1.el8.x86_64

# composer-cli compose start RHEL8-VMWare-CIS vmdk
Compose 9670ce16-46e8-4d46-b6f1-60954b77dea8 added to the queue

# composer-cli compose status
9670ce16-46e8-4d46-b6f1-60954b77dea8 FINISHED Tue Feb 14 09:22:09 2023 RHEL8-VMWare-CIS 0.0.1 vmdk             48384000000

Comment 15 errata-xmlrpc 2023-05-16 08:27:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Image Builder security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2780


Note You need to log in before you can comment on or make changes to this bug.