Conversation
Port fixed_fallback selection policy from itoywh/dae PR #1009 (canonical diff fee4c86...b68fd9f0) onto the olicesx/dae kdae (3.0) codebase. - common/consts/dialer.go: add DialerSelectionPolicy_FixedWithFallback - component/outbound/dialer_selection_policy.go: parse fixed_fallback (index[,timeout[,retries[,fallback_policy]]]) with unit-aware duration - component/outbound/dialer/connectivity_check.go: AliveForRetry (mirror DNS-UDP to same-family TCP when no udp_check_dns), dynamic CheckOpts build (only probe configured targets, skip IPv6 when only IPv4 given), check_interval==0 disables probing, Node became DEAD/ALIVE logging, stuck-probe timeout - component/outbound/dialer_group.go: FixedWithFallback select path, background runFixedFallbackRetry goroutine (timeout x retries, <2s clamp), alive-transition-callback driven start, rate-limited fallback logging - control/control_plane.go: warn when health check is disabled (check_interval==0) or has no probe target - .github/workflows/build.yml + seed-build.yml: self-contained build (drop ci-seed-jobs pre/post-actions, restrict matrix to amd64+arm64)
… check_interval=0 Surfaces the policy-specific misconfiguration: if a fixed_fallback policy asks for retries>0 but the global health check is disabled (check_interval==0), the background retry probes are silently dropped (aliveBackground returns early when CheckInterval==0), so the node falls back permanently on first failure. Native #1009 sub-feature.
…e() (reload/shutdown) runFixedFallbackRetry now returns on the dialer's Done() channel instead of blocking until retries are exhausted, so a dae shutdown or a reload that replaces the dialer no longer leaves the probing goroutine dangling. Adds exported Dialer.Done() (dialer.go). Native #1009 sub-feature.
…partial-death jitter Track the networkType the retry goroutine is probing (fixedFallbackNt). A select on a different networkType (partial node death, e.g. TCP alive / UDP dead) no longer resets that networkType's retry state, which previously caused log jitter and prevented the goroutine from settling. Native #1009 sub-feature.
…nt fallback) retries=0 is now valid = give up immediately, no background retry, matching the canonical 'retries<=0 = do not retry' semantics. Parser now rejects <0 only (default still 3). Native #1009 sub-feature.
…h warns on unhandled policy Add a default branch to the doFallback switch that warns on an unhandled FallbackPolicy instead of silently returning ErrNoAliveDialer, so future policies are surfaced, not mysteriously dropped. Native #1009 sub-feature.
…rden commit) The harden fixed_fallback commit (e3e3ec2) left dialer_group.go with a gofmt formatting deviation at the AliveForRetry wiring, which made the CI Lint job fail on every subsequent build. Reformat to clear the debt so the Lint job passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
来源
从 daeuniverse/dae 官方 PR #1009 迁移至自维护库 itoywh/kdae(官方合并无望,转为自用)。
功能
为 dialer_group 增加
fixed_fallback选路策略:主节点死亡时立即回退到备用节点,并通过后台 goroutine 独立探活恢复,消除 reload 造成的瞬时断流。包含 commit
影响文件
component/outbound/dialer_group.go, connectivity_check.go, dialer_selection_policy.go, dialer.go, common/consts/dialer.go, control/control_plane.go, .github/workflows/*