Also report VG-s / PV-s when a VG has no LV#166
Merged
ogayot merged 3 commits intocanonical:mainfrom Mar 9, 2026
Merged
Conversation
We want the VG name to be the identifier, and since we're passing the VG name to the extract_lvm_volume_group function, we don't need to return it. The caller already has all the info that they need. Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
If a VG has two or more LVs (which is very common), probert mistakenly assumes there is a "duplicate VG" and logs it as an error. But this is plain wrong. Probert loops through all the LV-s and checks whether the LV's underlying VG has already been discovered. So for a VG with 5 LV-s, probert will claim that there are duplicate VG-s 4 times. This was reported as an observation in LP: #1941968. Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Previously, probert did not list a VG (or associated PVs) if there is no LV inside of it. Having the information about empty VGs is important when Subiquity generates the name of a VG to create. Indeed, the name it generates must not conflict with any existing ones, otherwise, LVM will refuse to create it. Fixed by listing VGs that have no LV as well. LP: #2143299 Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, probert did not list a VG (or associated PVs) if there is no LV inside of it.
Having the information about empty VGs is important when Subiquity generates the name of a VG to create. Indeed, the name it generates must not conflict with any existing ones, otherwise, LVM will refuse to create it.
Fixed by listing VGs that have no LV as well.
LP:#2143299
I also fixed an issue where probert would error-log "Found duplicate volume group" for all VG-s that have more than one LV.
For a VG with 11 LVs, we previously got 10 misleading "duplicates" errors:
which is obviously wrong.