Open grtxghe opened 2 months ago
Additional Information:
ORIGINAL:
- name: Create snapshots
community.general.lvol:
vg: "{{ item.vg }}"
lv: "{{ item.lv }}"
snapshot: "{{ item.lv }}_{{ snapshot_create_set_name }}"
size: "{{ item.size | default(omit) }}"
loop: "{{ snapshot_create_volumes }}"
MODIFICATION:
- name: Create snapshots
community.general.lvol:
vg: "{{ item.vg }}"
lv: "{{ item.lv }}"
snapshot: "{{ item.lv }}_{{ snapshot_create_set_name }}"
loop: "{{ snapshot_create_volumes }}"
If using the modified task 'Create snapshots':
TASK [infra.lvm_snapshots.snapshot_revert : Verify that the snapshot is active] ***
fatal: [lvmtest5.example.com]: FAILED! => {
"assertion": "snapshot_revert_lv_attr[0] == 's'",
"changed": false,
"evaluated_to": false,
"msg": "Assertion failed"
}
Rollback will fail.
Hi,
When trying to use the collection/role infra.lvm_snapshots.snapshot_create, it fails when there is lvm thin pool in the managed node. Snashot and rollback works fine with regular LVM but not when thin pool is used.
ANSIBLE IN USE: from RH-SAT 6.15 RH-SATELLITE: ANSIBLE JOB TEMPLATE ANSIBLE VERSION: ansible-core-2.16.3-2.el8.x86_64 ANSIBLE COLLECTIONS :
=> COLLECTIONS FAILS FOR THINPOOL LVM WITH NO SIZE:
ERROR: --size may not be zero.\n Run `lvcreate --help' for more information.\n" From DOCs: https://github.com/redhat-cop/infra.lvm_snapshots/tree/main/roles/snapshot_create#size The size of the logical volume according to the definition of the size parameter of the community.general.lvol module. To create thin provisioned snapshot of a thin provisioned volume, omit the size parameter or set it to 0