container-storage-setup icon indicating copy to clipboard operation
container-storage-setup copied to clipboard

Fix: 002-test-reject-disk-with-lvm-signature.sh

Open shishir-a412ed opened this issue 7 years ago • 10 comments

Signed-off-by: Shishir Mahajan [email protected]

shishir-a412ed avatar Apr 11 '17 20:04 shishir-a412ed

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.

shishir-a412ed avatar Apr 11 '17 20:04 shishir-a412ed

:umbrella: The latest upstream changes (presumably 32ec977) made this pull request unmergeable. Please resolve the merge conflicts.

rh-atomic-bot avatar Apr 12 '17 14:04 rh-atomic-bot

@shishir-a412ed can you rebase this PR on top of latest tree.

rhvgoyal avatar Apr 12 '17 17:04 rhvgoyal

@rhvgoyal PTAL.

shishir-a412ed avatar Apr 12 '17 17:04 shishir-a412ed

@shishir-a412ed Can you please take care of minor comments.

rhvgoyal avatar Apr 12 '17 20:04 rhvgoyal

@rhvgoyal PTAL.

shishir-a412ed avatar Apr 12 '17 20:04 shishir-a412ed

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 avatar Apr 12 '17 21:04 rhvgoyal

@rhvgoyal PTAL.

shishir-a412ed avatar Apr 19 '17 21:04 shishir-a412ed

@rhvgoyal PTAL.

shishir-a412ed avatar Apr 25 '17 19:04 shishir-a412ed

@rhvgoyal We should either close these pull requests or rework them or merge them.

rhatdan avatar Jun 30 '17 14:06 rhatdan