Noble backports May 2026#167
Merged
Merged
Conversation
Previously when dealing with a VG that had missing PV(s), probert storage would
return something like:
"lvm": {
"logical_volumes": { [...] },
"physical_volumes": {"ubuntu-vg": ["/dev/sda", "[unknown]"]},
"volume_groups": {
"ubuntu-vg": {
"name": "ubuntu-vg", "devices": ["/dev/sda", "[unknown]"],
"size": "234567890B"
}
}
We now remove [unknown] entries (which correspond to missing PVs) but mark a VG
that has missing PVs as "partial: true":
"lvm": {
"logical_volumes": { [...] },
"physical_volumes": {"ubuntu-vg": ["/dev/sda"]},
"volume_groups": {
"ubuntu-vg": {
"name": "ubuntu-vg", "devices": ["/dev/sda"],
"size": "234567890B", "partial": true
}
}
This should prevent curtin from failing to validate the storage config. If need
be, we can add special handling for VGs that have "partial: true".
LP: #2142196
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
(cherry picked from commit fd395a2)
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> (cherry picked from commit 8da1101)
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> (cherry picked from commit d1e0b45)
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> (cherry picked from commit 1e4f540)
There was a problem hiding this comment.
Pull request overview
Backport of upstream LVM probing fixes to improve storage reporting robustness: exclude missing PV placeholders, surface partial VGs, and ensure empty VGs are still reported (to avoid name collisions and downstream validation failures).
Changes:
- Extend
vgsJSON report options to includepv_missing, and exclude missing PVs from the reported device lists while marking VGs aspartial. - Populate
volume_groups/physical_volumesfrom thevgsreport so VGs are reported even when they contain no LVs. - Update/extend unit tests to assert the new
partialfield and missing-PV filtering behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
probert/lvm.py |
Adds pv_missing to vgs reporting, filters missing PVs, adds partial flag, and changes probe flow to report VGs even without LVs. |
probert/tests/test_lvm.py |
Updates fixtures/expectations for pv_missing and partial, and adds coverage for partial VG extraction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com> (cherry picked from commit d36855e)
dbungert
approved these changes
May 27, 2026
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.
This is a backport of the following PRs:
LP:#2142196, LP:#2143299