container-storage-setup
container-storage-setup copied to clipboard
Fix: 002-test-reject-disk-with-lvm-signature.sh
Signed-off-by: Shishir Mahajan [email protected]
Right now when I run test 002-test-reject-disk-with-lvm-signature.sh
on upstream/master branch I see the following errors in the logs.
Running test ./002-test-reject-disk-with-lvm-signature.sh
Physical volume "/dev/vdb" successfully created.
ERROR: Found LVM2_member signature on device /dev/vdb at offset 0x218. Wipe signatures using wipefs or use WIPE_SIGNATURES=true and retry.
Volume group "css-test-foo" not found
Cannot process volume group css-test-foo
Please enter a physical volume path
Run `pvremove --help' for more information.
Error: /dev/vdb: unrecognised disk label
/dev/vdb: 8 bytes were erased at offset 0x00000218 (LVM2_member): 4c 56 4d 32 20 30 30 31
This PR fixes that problem.
ping @rhvgoyal
PS: I will open a separate PR for test 102-test-reject-disk-with-lvm-signature.sh
which has same issue.
:umbrella: The latest upstream changes (presumably 32ec977) made this pull request unmergeable. Please resolve the merge conflicts.
@shishir-a412ed can you rebase this PR on top of latest tree.
@rhvgoyal PTAL.
@shishir-a412ed Can you please take care of minor comments.
@rhvgoyal PTAL.
I think we can modify remove_pvs() to remove pvs both from partition and disk if pv exists. So we can implement a function pv_exists() and if pv exists, remove it. And then do this check both on partition as well device.
Same thing we can do for volume group. check for vg_exists() and if volume group exists, remove it. That will get rid of error.
@rhvgoyal PTAL.
@rhvgoyal PTAL.
@rhvgoyal We should either close these pull requests or rework them or merge them.