{"record":{"id":"9546e3ddd366ab03","repo":"grpc/grpc-go","slug":"failed-to-correctly-update-outlier-detection-confi","errorCode":null,"errorMessage":"failed to correctly update Outlier Detection config %v","messagePattern":"failed to correctly update Outlier Detection config (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/balancer/cdsbalancer/cdsbalancer.go","lineNumber":251,"sourceCode":"\tclusterConfig := b.clusterConfigs[clusterName].Config\n\n\tvar newPriorities []*priorityConfig\n\tswitch clusterConfig.Cluster.ClusterType {\n\tcase xdsresource.ClusterTypeEDS, xdsresource.ClusterTypeLogicalDNS:\n\t\tp := b.updatePriorityConfig(clusterName, &clusterConfig)\n\t\tnewPriorities = append(newPriorities, p)\n\tcase xdsresource.ClusterTypeAggregate:\n\t\tfor _, leaf := range clusterConfig.AggregateConfig.LeafClusters {\n\t\t\tleafCluster := b.clusterConfigs[leaf]\n\t\t\t// Update priority config for leaf clusters.\n\t\t\tp := b.updatePriorityConfig(leaf, &leafCluster.Config)\n\t\t\tnewPriorities = append(newPriorities, p)\n\t\t}\n\t}\n\tb.priorities = newPriorities\n\n\tif err := b.updateOutlierDetection(); err != nil {\n\t\treturn b.annotateErrorWithNodeID(fmt.Errorf(\"failed to correctly update Outlier Detection config %v\", err))\n\t}\n\n\t// The LB policy is configured by the root cluster.\n\tif err := json.Unmarshal(clusterConfig.Cluster.LBPolicy, &b.xdsLBPolicy); err != nil {\n\t\treturn b.annotateErrorWithNodeID(fmt.Errorf(\"error unmarshalling xDS LB Policy: %v\", err))\n\t}\n\tif err := b.updateChildConfig(); err != nil {\n\t\treturn b.annotateErrorWithNodeID(err)\n\t}\n\treturn nil\n}\n\n// updateChildConfig builds child policy configuration using endpoint addresses\n// returned from the XDSConfig and child policy configuration.\n//\n// A child policy is created if one doesn't already exist. The newly built\n// configuration is then pushed to the child policy.\nfunc (b *cdsBalancer) updateChildConfig() error {","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/grpc/grpc-go/blob/03255a9237b6eb32710f6bc4f2de9a675b99fe36/internal/xds/balancer/cdsbalancer/cdsbalancer.go#L233-L269","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before: xds imported without outlier detection\nimport (\n    _ \"google.golang.org/grpc/xds\"\n)\n// after: ensure outlier detection is available\nimport (\n    _ \"google.golang.org/grpc/xds\"\n    _ \"google.golang.org/grpc/balancer/outlierdetection\"\n)","handlingStrategy":"validation","validationCode":"// Verify outlier detection is registered before starting xDS\nfunc isOutlierDetectionRegistered() bool {\n    return balancer.Get(outlierdetection.Name) != nil\n}","typeGuard":null,"tryCatchPattern":"// Monitor channel connectivity state after xDS config updates\nif state := conn.GetState(); state == connectivity.TransientFailure {\n    // check logs for 'failed to correctly update Outlier Detection config'\n    // verify outlier detection package is imported\n}","preventionTips":["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"],"tags":["xds","cds","outlier-detection","config","balancer"],"analyzedSha":"03255a9237b6eb32710f6bc4f2de9a675b99fe36","analyzedAt":"2026-08-07T00:29:34.215Z","schemaVersion":2},"datasetVersion":"2026-08-07T03:17:09.362Z"}