grpc/grpc-go · error
failed to correctly update Outlier Detection config %v
Error message
failed to correctly update Outlier Detection config %v
What it means
The CDS balancer's handleClusterUpdate calls updateOutlierDetection() which sets up circuit-breaker-style outlier detection for each priority. This error wraps any failure from that function, which can include: the outlier detection LB policy not being registered, its config parser being missing, or the Outlier Detection JSON from the cluster resource being unparseable.
Source
Thrown at internal/xds/balancer/cdsbalancer/cdsbalancer.go:251
clusterConfig := b.clusterConfigs[clusterName].Config
var newPriorities []*priorityConfig
switch clusterConfig.Cluster.ClusterType {
case xdsresource.ClusterTypeEDS, xdsresource.ClusterTypeLogicalDNS:
p := b.updatePriorityConfig(clusterName, &clusterConfig)
newPriorities = append(newPriorities, p)
case xdsresource.ClusterTypeAggregate:
for _, leaf := range clusterConfig.AggregateConfig.LeafClusters {
leafCluster := b.clusterConfigs[leaf]
// Update priority config for leaf clusters.
p := b.updatePriorityConfig(leaf, &leafCluster.Config)
newPriorities = append(newPriorities, p)
}
}
b.priorities = newPriorities
if err := b.updateOutlierDetection(); err != nil {
return b.annotateErrorWithNodeID(fmt.Errorf("failed to correctly update Outlier Detection config %v", err))
}
// The LB policy is configured by the root cluster.
if err := json.Unmarshal(clusterConfig.Cluster.LBPolicy, &b.xdsLBPolicy); err != nil {
return b.annotateErrorWithNodeID(fmt.Errorf("error unmarshalling xDS LB Policy: %v", err))
}
if err := b.updateChildConfig(); err != nil {
return b.annotateErrorWithNodeID(err)
}
return nil
}
// updateChildConfig builds child policy configuration using endpoint addresses
// returned from the XDSConfig and child policy configuration.
//
// A child policy is created if one doesn't already exist. The newly built
// configuration is then pushed to the child policy.
func (b *cdsBalancer) updateChildConfig() error {View on GitHub (pinned to 03255a9237)
Solutions
- Ensure the outlier detection package is imported (import _ "google.golang.org/grpc/xds/internal/balancer/outlierdetection") so it registers with the balancer registry
- Check the management server's outlier detection config for the offending cluster for validity
- Upgrade your grpc-go version to ensure the outlierdetection builder properly implements ConfigParser
- Enable GRPC_GO_LOG_SEVERITY=info to see the underlying error from updateOutlierDetection() for the specific root cause
Example fix
// before: xds imported without outlier detection
import (
_ "google.golang.org/grpc/xds"
)
// after: ensure outlier detection is available
import (
_ "google.golang.org/grpc/xds"
_ "google.golang.org/grpc/balancer/outlierdetection"
) Defensive patterns
Strategy: validation
Validate before calling
// Verify outlier detection is registered before starting xDS
func isOutlierDetectionRegistered() bool {
return balancer.Get(outlierdetection.Name) != nil
} Try / catch
// Monitor channel connectivity state after xDS config updates
if state := conn.GetState(); state == connectivity.TransientFailure {
// check logs for 'failed to correctly update Outlier Detection config'
// verify outlier detection package is imported
} Prevention
- Always import the outlier detection package when using xDS: import _ "google.golang.org/grpc/balancer/outlierdetection"
- Validate management server outlier detection configs against gRFC A50 schema
- Run xDS conformance tests against your management server configuration
- Keep grpc-go version current to ensure outlierdetection builder compatibility
When it happens
Trigger: Triggered inside handleClusterUpdate() when updateOutlierDetection() returns a non-nil error. The underlying causes are: (1) the outlierdetection balancer is not registered (missing import), (2) its builder doesn't implement ConfigParser, (3) the Outlier Detection JSON config from the management server fails to parse, or (4) the parsed config has an unexpected type.
Common situations: The gRPC application imports xds but does not import the outlier detection package; the xDS management server sends malformed outlier detection configuration; a custom build that excludes outlier detection dependencies; version mismatch where the outlierdetection module changed its API.
Related errors
- xds: unable to unmarshal lbconfig: %s, error: %v
- error parsing Outlier Detection config %v: %v
- xds: unable to unmarshal LBconfig: %s, error: %v
- no priority is provided, all priorities are removed
- xds_wrr_locality: invalid LBConfig: child policy field must
AI-assisted analysis of grpc/grpc-go@03255a9237 (2026-08-07).
Data as JSON: /api/errors/9546e3ddd366ab03.
Report an issue: GitHub.