mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-02 19:32:47 +00:00
lvol: fix thin-pool creation with percentage size (#11925)
* fix(lvol): use --extents (-l) for thin-pool creation with percentage size Fixes #11923 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(lvol): add changelog fragment for #11925 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(lvol): add integration tests for thin-pool creation with percentage sizes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(lvol): use extent-aligned size for thin-pool absolute-size idempotency test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(lvol): reduce thin-pool sizes to leave space for test_pvs.yml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(lvol): add shrink=false to thin-pool absolute-size idempotency check Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(lvol): add shrink: false to thin volume idempotency test LVM reports thin volume size slightly above requested (metadata overhead), triggering spurious shrink attempts. Disable shrink for idempotency checks to avoid false failures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -505,15 +505,26 @@ def main():
|
||||
vg=[f"{vg}/{thinpool}"],
|
||||
)
|
||||
else:
|
||||
with lvcreate("test yes size_L opts thin vg pvs") as ctx:
|
||||
rc, dummy, err = ctx.run(
|
||||
test=module.check_mode,
|
||||
yes=use_yes,
|
||||
size_L=size_value,
|
||||
opts=opts,
|
||||
vg=[f"{vg}/{thinpool}"],
|
||||
pvs=pvs,
|
||||
)
|
||||
if size_opt == "l":
|
||||
with lvcreate("test yes size_l opts thin vg pvs") as ctx:
|
||||
rc, dummy, err = ctx.run(
|
||||
test=module.check_mode,
|
||||
yes=use_yes,
|
||||
size_l=size_value,
|
||||
opts=opts,
|
||||
vg=[f"{vg}/{thinpool}"],
|
||||
pvs=pvs,
|
||||
)
|
||||
else:
|
||||
with lvcreate("test yes size_L opts thin vg pvs") as ctx:
|
||||
rc, dummy, err = ctx.run(
|
||||
test=module.check_mode,
|
||||
yes=use_yes,
|
||||
size_L=size_value,
|
||||
opts=opts,
|
||||
vg=[f"{vg}/{thinpool}"],
|
||||
pvs=pvs,
|
||||
)
|
||||
else:
|
||||
if size_opt == "l":
|
||||
with lvcreate("test yes lv size_l opts vg pvs") as ctx:
|
||||
|
||||
Reference in New Issue
Block a user