lvol: Fix pct of origin (#7053)

* add support for percentage of origin size for creating snapshot volumes

* add changelog fragment

* add pull request link

Co-authored-by: Felix Fontein <felix@fontein.de>

* fix what's not idempotent

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Bob Mader 2023-08-12 02:58:12 -05:00 committed by GitHub
commit a0c67a8894
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 16 deletions

View file

@ -12,10 +12,10 @@
shell: vgs -v testvg -o pv_size --noheading --units b | xargs
register: cmd_result
- name: Assert the testvg size is 8388608B
- name: Assert the testvg size is 33554432B
assert:
that:
- "'8388608B' == cmd_result.stdout"
- "'33554432B' == cmd_result.stdout"
- name: Increases size in file
command: "dd if=/dev/zero bs=8MiB count=1 of={{ remote_tmp_dir }}/img1 conv=notrunc oflag=append"
@ -38,10 +38,10 @@
shell: vgs -v testvg -o pv_size --noheading --units b | xargs
register: cmd_result
- name: Assert the testvg size is still 8388608B
- name: Assert the testvg size is still 33554432B
assert:
that:
- "'8388608B' == cmd_result.stdout"
- "'33554432B' == cmd_result.stdout"
- name: "Reruns lvg with pvresize:yes and check_mode:yes"
lvg:
@ -60,10 +60,10 @@
shell: vgs -v testvg -o pv_size --noheading --units b | xargs
register: cmd_result
- name: Assert the testvg size is still 8388608B
- name: Assert the testvg size is still 33554432B
assert:
that:
- "'8388608B' == cmd_result.stdout"
- "'33554432B' == cmd_result.stdout"
- name: "Reruns lvg with pvresize:yes"
lvg:
@ -75,7 +75,7 @@
shell: vgs -v testvg -o pv_size --noheading --units b | xargs
register: cmd_result
- name: Assert the testvg size is now 16777216B
- name: Assert the testvg size is now 41943040B
assert:
that:
- "'16777216B' == cmd_result.stdout"
- "'41943040B' == cmd_result.stdout"