Skip to content

Noble backports May 2026#167

Merged
ogayot merged 5 commits into
canonical:ubuntu/noblefrom
ogayot:noble-may-2026
May 28, 2026
Merged

Noble backports May 2026#167
ogayot merged 5 commits into
canonical:ubuntu/noblefrom
ogayot:noble-may-2026

Conversation

@ogayot

@ogayot ogayot commented May 26, 2026

Copy link
Copy Markdown
Member

ogayot added 4 commits May 26, 2026 16:10
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)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 vgs JSON report options to include pv_missing, and exclude missing PVs from the reported device lists while marking VGs as partial.
  • Populate volume_groups / physical_volumes from the vgs report so VGs are reported even when they contain no LVs.
  • Update/extend unit tests to assert the new partial field 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.

Comment thread probert/lvm.py
Comment thread probert/tests/test_lvm.py
@ogayot ogayot changed the title Noble may 2026 Noble backports May 2026 May 26, 2026
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
(cherry picked from commit d36855e)
@ogayot ogayot merged commit cd86d1e into canonical:ubuntu/noble May 28, 2026
3 checks passed
@ogayot ogayot deleted the noble-may-2026 branch May 28, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants