-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CA-393194: Fix pvremove failure #694
CA-393194: Fix pvremove failure #694
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@rdn32 we probably want to backport this to 8.2 as I suspect it will resolve your partner issue. |
331ee84
to
9132e8f
Compare
Whilst this change is in itself fine we will need to add unit tests for the code modified in order to be able to release it. Either in this PR or in a follow-up. test_lvutil.py has separate classes for the various operations and currently does not have anything for VG/PV management |
Sure. I will add unit tests in this PR. |
In lvmohba test, the test failed at `SR.destroy(sr_ref) -> removeVG -> pvremove ` with the lvm error message "No devices to process". The root cause is that the PV which was to be removed was not really used as PV when it comes to multipathed devices. The LVM official document says: "Since each LUN has multiple device nodes in /dev that point to the same underlying data, they all contain the same LVM metadata and thus LVM commands will find the same metadata multiple times and report them as duplicates. These duplicate messages are only warnings and do not mean the LVM operation has failed. Rather, they are alerting the user that only one of the devices has been used as a physical volume and the others are being ignored." Please refer to https://docs.redhat.com/en/documentation/ red_hat_enterprise_linux/6/html/logical_volume_manager_administration /duplicate_pv_multipath#duplicate_pv_multipath This fix is to find the real PV in a VG before removing the VG. Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
e0ecb42
9132e8f
to
e0ecb42
Compare
Added unit tests. |
In lvmohba test, the test failed at
SR.destroy(sr_ref) -> removeVG -> pvremove
with the lvm error message "No devices to process".The root cause is that the PV which was to be removed
was not really used as PV when it comes to multipathed devices.
The LVM official document says:
"Since each LUN has multiple device nodes in /dev that point to the same underlying data,
they all contain the same LVM metadata
and thus LVM commands will find the same metadata
multiple times and report them as duplicates.
These duplicate messages are only warnings
and do not mean the LVM operation has failed.
Rather, they are alerting the user that only one of the devices has been used as a physical volume and the others are being ignored."
Please refer to https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/duplicate_pv_multipath#duplicate_pv_multipath
This fix is to find the real PV in a VG before removing the VG.
Test passed: 4038532