fix: add ipv6 support to wekaclient - #2678
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
How to use the Graphite Merge QueueAdd the label main-merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Claude finished @assafgi's task in 3m 51s —— View job Review: ipv6 support for WekaClient
The propagation itself is correct and minimal: 1. Generated API docs weren't regenerated (should fix)
Run While you're in the API repo: give the new field a doc comment ( 2.
|
There was a problem hiding this comment.
Pull request overview
This PR adds IPv6 support propagation for WekaClient by wiring the spec.ipv6 setting into the generated WekaContainer spec and ensuring it is reconciled on updates, aligning client container behavior with existing IPv6 handling in the container/pod rendering path.
Changes:
- Propagate
wekaClient.Spec.Ipv6into the clientWekaContainerSpecduring container creation. - Extend
UpdatableClientSpecto includeIpv6so it participates in reconciliation diffs. - Update
updateContainerIfChangedto detect and applyIpv6changes to existing client containers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Graphite Automations"Add anton/matt/sergey/kristina as reviwers on operator PRs" took an action on this PR • (07/27/26)2 reviewers were added to this PR based on Anton Bykov's automation. |
f801b1e to
0935995
Compare
|
Claude finished @assafgi's task in 37s —— View job Review: ipv6 support for WekaClient — no changes since last review
The PR content is byte-identical to what I reviewed earlier in this thread: still one commit (
Recap of the three open items from my earlier review
• Branch • |
0935995 to
4e400ba
Compare
|
Claude finished @assafgi's task in 2m 45s —— View job Review: ipv6 support for WekaClient — re-review
All three items from my earlier review were addressed. The design decision — make Resolved:
Two issues in the new validation code, both consequences of items 2 and 3 interacting. 1. The warning compares spec-to-spec, so it goes quiet exactly when the user thinks they fixed it (should fix)
2. Throttle key is global, so only one mismatched client per 30s gets an event (should fix)
Notes (non-blocking)
|
| &lifecycle.SimpleStep{ | ||
| Run: loop.validateClientClusterIpFamily, | ||
| Predicates: lifecycle.Predicates{ | ||
| func() bool { return loop.targetCluster != nil }, | ||
| }, | ||
| }, |
| | nodeSelector | map[string]string | | | ||
| | wekaSecretRef | string | | | ||
| | network | Network | | | ||
| | ipv6 | bool | use ipv6 for weka client networking configuration | |
| "name": "Ipv6", | ||
| "jsonName": "ipv6", | ||
| "type": "bool", | ||
| "description": "use ipv6 for weka client networking configuration", | ||
| "optional": true |
4e400ba to
6a980b8
Compare
|
Claude finished @assafgi's task in 1m 21s —— View job Review: ipv6 support for WekaClient — no changes since last review
The code is identical to the state I reviewed at 07:21. Same three-file diff (+56/−1), same submodule pointer ( The three items from my first review remain resolved. The two items from the 07:21 review are still open — both are in Recap of the two open items1. The mismatch warning compares spec-to-spec, so it goes quiet exactly when the user thinks they fixed it. 2. Throttle key is global, so only one mismatched client per 30s gets an event. Also still open, and worth folding in since Copilot raised the same point independently on Could not build, test, or lint: • Branch • |
| func (c *clientReconcilerLoop) validateClientClusterIpFamily(ctx context.Context) error { | ||
| logger := instrumentation.CurrentSpanLogger(ctx) | ||
|
|
||
| if c.targetCluster == nil || c.wekaClient.Spec.Ipv6 == c.targetCluster.Spec.Ipv6 { | ||
| return nil | ||
| } | ||
|
|
||
| msg := fmt.Sprintf("client ipv6=%t differs from target cluster %q ipv6=%t; if the management network is single-family this may cause join/mount failures — verify spec.ipv6 matches the target cluster (safe to ignore on dual-stack)", | ||
| c.wekaClient.Spec.Ipv6, c.targetCluster.Name, c.targetCluster.Spec.Ipv6) | ||
| logger.Warn("Client/cluster ipv6 mismatch", | ||
| "client", c.wekaClient.Name, | ||
| "clientIpv6", c.wekaClient.Spec.Ipv6, | ||
| "targetCluster", c.targetCluster.Name, | ||
| "clusterIpv6", c.targetCluster.Spec.Ipv6, | ||
| ) | ||
| _ = c.RecordEventThrottled(v1.EventTypeWarning, "ClientClusterIpv6Mismatch", msg, 30*time.Second) //nolint:errcheck // best-effort event | ||
|
|
||
| return nil | ||
| } |
6a980b8 to
afab420
Compare
|
Claude finished @assafgi's task in 3m 2s —— View job Review: ipv6 support for WekaClient — re-review
The Go file grew from +56/−1 to +101/−9, so this is a real change, not a restack. Both open items are addressed, and the doc-comment gap Copilot and I both raised is closed too. The reasoning captured in the comment block at Resolved:
Two things left, both small. 1. The log line drops the reason and can show two identical values (should fix)
Two identical values under a "mismatch" headline, and no mention of the container that's actually wrong. Operator logs and traces are usually where this gets debugged, and the event may already have aged out by then. Adding 2. "changing it on an existing WekaClient has no effect" isn't quite true — scale-out picks up the new value (should fix, doc wording)The new field description says a change has no effect. But The validation does catch this (the old containers trip branch 2, the new ones trip branch 1 if they now differ from the cluster), so it's detectable rather than silent — that's why this is wording, not a correctness bug. But the description is what users act on, and "no effect" invites exactly the edit that produces the split. Something like applied when each client container is first created; changing it does not affect existing containers, and containers created later will use the new value — recreate the WekaClient to switch IP family consistently is accurate. Same edit belongs in the submodule doc comment, since that's the source. Fix this → Notes (non-blocking)
• Branch • |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
internal/controllers/wekaclient/client_reconciler_loop.go:996
- When multiple client containers exist, this loop stops at the first container that differs from spec.ipv6 even if a later container actually mismatches the target cluster’s ipv6 setting. That can produce a less actionable/misleading warning (spec-vs-container) while the real problem is container-vs-cluster, which is what blocks join/mount.
for _, container := range c.containers {
if container.Spec.Ipv6 != clusterIpv6 {
reason = fmt.Sprintf("client container %q runs ipv6=%t but target cluster %q has ipv6=%t; recreate the WekaClient to switch IP family",
container.Name, container.Spec.Ipv6, c.targetCluster.Name, clusterIpv6)
} else if c.wekaClient.Spec.Ipv6 != container.Spec.Ipv6 {

No description provided.