Repository navigation
fix(linstor-migrate): name every fresh-port warning "no DRBD port" #261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2173,8 +2173,15 @@ func (c *converter) reportUnmatchedPortNodes() { | |
| continue | ||
| } | ||
|
|
||
| // A definition that did not convert, or has no replica that | ||
| // does, gets no port at all: nothing for the operator to fix. | ||
| replicas := c.liveReplicas(row.ResourceName) | ||
| if !c.convertedRD[row.ResourceName] || len(replicas) == 0 { | ||
| continue | ||
| } | ||
|
|
||
| known := map[string]bool{} | ||
| for _, replica := range c.liveReplicas(row.ResourceName) { | ||
| for _, replica := range replicas { | ||
| known[strings.ToLower(replica.NodeName)] = true | ||
| known[strings.ToLower(c.displayNode(replica.NodeName))] = true | ||
| } | ||
|
|
@@ -2195,7 +2202,7 @@ func (c *converter) reportUnmatchedPortNodes() { | |
|
|
||
| rdDsp := c.displayRD(row.ResourceName) | ||
| if len(unmatched) == len(perReplica) { | ||
| c.warnf("resource definition %s: no node in the live port map (%s) hosts a replica of it — check that the map uses LINSTOR's node names; every replica will get a fresh port and reconnect on adoption", | ||
| c.warnf("resource definition %s: no DRBD port for any replica: no node in the live port map (%s) hosts a replica of it — check that the map uses LINSTOR's node names; every replica will get a fresh port and reconnect on adoption", | ||
| rdDsp, strings.Join(unmatched, ", ")) | ||
|
|
||
| continue | ||
|
|
@@ -2256,7 +2263,7 @@ func (c *converter) resolveReplicaDRBDPort(row *ResourceRow, dumpPort *int32, rd | |
| } | ||
|
|
||
| c.warnOncef("drbdport:"+row.ResourceName+":"+row.NodeName, | ||
| "resource %s.%s: the live map has ports for the other replicas of %s but none for this one — blockstor will allocate a fresh port for it, and this replica will reconnect on adoption", | ||
| "resource %s.%s: no DRBD port for this replica in the live map, which has ports for the other replicas of %s — blockstor will allocate a fresh port for it, and this replica will reconnect on adoption", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not imply that all other replicas have ports. If replicas A, B, and C exist and the map contains only A, both B and C get this warning. Each warning says the map has ports for “the other replicas,” although another replica also lacks a port. Say that the map has a port for at least one other replica.
|
||
| rdDsp, nodeDsp, rdDsp) | ||
|
|
||
| return nil | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Distinguish a definition with no live replicas.
If the only replica is marked DELETE,
liveReplicasexcludes it and this branch reports that every replica will get a fresh port and reconnect.convertResourcesalso skips that replica, so there is nothing to reconnect. The runbooks tell operators to resolve this warning, but capturing ports or correcting node names cannot make the deleted replica live. Report the stale map entry separately when there are no live replicas.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 44acdb2: a definition that didn't convert, or has no replica that converts, is skipped now, so there is no warning for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Analysis chain
Script executed:
Length of output: 11582
@kvapsThe guard fixes the case where the only replica is markedDELETE. One case remains:liveReplicasincludes replicas with volumes on multiple storage pools, butconvertResourcesskips them.If all replicas are skipped for that reason and the port map matches none of them, the warning still says every replica will reconnect. Please exclude those replicas from the port-warning calculation and add a regression test. I’m not marking the finding as addressed yet.
You are interacting with an AI system.