Skip to content

feat: add critical label checks for InstanceManagers to longhornctl diagnose - #633

Closed
sudeepr34 wants to merge 2 commits into
longhorn:masterfrom
sudeepr34:feat/diagnose-instancemanager-labels-v2
Closed

sudeepr34 wants to merge 2 commits into
longhorn:masterfrom
sudeepr34:feat/diagnose-instancemanager-labels-v2

Conversation

@sudeepr34

Copy link
Copy Markdown

Which issue(s) this PR fixes:

Issue longhorn/longhorn#9458

Issue # longhorn/longhorn#9458

What this PR does / why we need it:

Extends the longhornctl diagnose InstanceManagers check to verify that each InstanceManager carries the labels the Longhorn controllers use to discover it, computed with the same types.GetInstanceManagerLabels() the controllers build their list selectors from (datastore.ListInstanceManagersBySelectorRO). A missing label or unexpected value is reported as an error, since a controller that can't find a valid instance manager can't attach or detach volumes.

Special notes for your reviewer:

go build ./..., go vet, and gofmt are clean. go test ./pkg/remote/diagnose/... passes, including the new TestCheckInstanceManagerLabels (labels present / missing / mismatched cases). The existing TestEvaluateInstanceManagers fixture was updated to build well-formed IMs so it keeps covering the running-state logic.

Additional documentation or context

…iagnose

Extend the diagnose InstanceManagers check to verify that each InstanceManager carries the labels the Longhorn controllers use to discover it (types.GetInstanceManagerLabels). Missing labels or unexpected values are reported as errors, since controllers unable to find a valid instance manager cannot attach or detach volumes.

Related: longhorn/longhorn#9458

Signed-off-by: Sudeep Reddy <sudeepr34@users.noreply.github.com>
…iagnose

Extend the diagnose InstanceManagers check to verify that each
InstanceManager carries the labels the Longhorn controllers use to
discover it (types.GetInstanceManagerLabels). Missing labels or unexpected
values are reported as errors, since controllers unable to find a valid
instance manager cannot attach or detach volumes.

Related: longhorn/longhorn#9458

Signed-off-by: Sudeep Reddy <sudeepr34@users.noreply.github.com>
@sudeepr34 sudeepr34 changed the title Feat/diagnose instancemanager labels v2 feat: add critical label checks for InstanceManagers to longhornctl diagnose Oct 6, 2026
@sudeepr34 sudeepr34 closed this Oct 6, 2026
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.

1 participant