Skip to content

Fix existing VG not being activated#153

Merged
Gerrit91 merged 1 commit into
metal-stack:masterfrom
tacho:vg-activation-fix
May 19, 2026
Merged

Fix existing VG not being activated#153
Gerrit91 merged 1 commit into
metal-stack:masterfrom
tacho:vg-activation-fix

Conversation

@tacho
Copy link
Copy Markdown
Contributor

@tacho tacho commented May 18, 2026

Description

We noticed that on Azure VMs with local NVMe disks, a host reboot did not activate the csi-lvm volume group, resulting in PVCs not being attached. We traced it down to a logic error - the driver checks if the volume group exists, but doesn't try to activate it if it does.

Used AI-Tools ✨

  • No AI used for this patch

@tacho tacho requested a review from a team as a code owner May 18, 2026 13:10
@majst01
Copy link
Copy Markdown
Contributor

majst01 commented May 18, 2026

Interesting, which OS Distro is on the host ? On our debian/ubuntu workers this is not required.

Maybe you can add a check if it is already active and activate only if not.

@tacho
Copy link
Copy Markdown
Contributor Author

tacho commented May 18, 2026

Interesting, which OS Distro is on the host ? On our debian/ubuntu workers this is not required.

CentOS Stream CoreOS 10.0.20260307-0 (Coughlan) - this is a RedHat OKD cluster.

Maybe you can add a check if it is already active and activate only if not.

Fair enough, I'll amend the patch in a bit.

If the VG exists but has inactive LVs - we activate it explicitly.
@tacho tacho force-pushed the vg-activation-fix branch from 6986d1a to 5232bd5 Compare May 18, 2026 14:33
@tacho
Copy link
Copy Markdown
Contributor Author

tacho commented May 18, 2026

@majst01 I amended the patch to only try to activate the VG if it exists but has non-active LVs.

@majst01 majst01 self-assigned this May 18, 2026
@majst01 majst01 requested a review from ostempel May 18, 2026 14:54
Copy link
Copy Markdown
Contributor

@majst01 majst01 left a comment

Choose a reason for hiding this comment

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

Looks good, waiting for @ostempel to approve as well

Copy link
Copy Markdown
Contributor

@Gerrit91 Gerrit91 left a comment

Choose a reason for hiding this comment

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

To me looks good, too. Thanks! Parsing the lv_attrs is somehow a bit cryptic but it does not seem like there's a better, more intuitive way to figure this out.

@Gerrit91 Gerrit91 merged commit 71b5f95 into metal-stack:master May 19, 2026
6 checks passed
@tacho tacho deleted the vg-activation-fix branch May 19, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants