{"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":"exception","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/0c51461d27177d997e14c642fe18c11668fc09a3/internal/xds/balancer/cdsbalancer/cdsbalancer.go#L233-L269","documentation":"Returned by handleClusterUpdate (line 251, wrapped via annotateErrorWithNodeID) when b.updateOutlierDetection() returns a non-nil error. This wraps the underlying outlier detection error with context and the node ID annotation. The underlying errors from updateOutlierDetection are errors 352-355 (builder not registered, parser missing, config parse failure, type assertion failure).","triggerScenarios":"A CDS cluster resource is received and validated, and during processing the outlier detection configuration embedded in the cluster resource fails to parse or build. The specific sub-error is one of: outlier detection builder not registered (352), builder lacks ConfigParser (353), ParseConfig fails on the OD JSON (354), or the parsed config has the wrong type (355).","commonSituations":"The management server sends an outlier detection configuration in the CDS cluster resource that the client's outlier detection balancer cannot parse (version skew). The outlier detection package is not imported/registered in the client binary. The OD config fields have invalid values (negative intervals, zero enforcement multiplier, etc.).","solutions":["Look at the wrapped inner error (the %v) to identify which sub-error (352-355) occurred and follow its specific remediation.","Ensure the outlier detection balancer is registered: import the full xds package.","Check for version skew between the management server and client — the OD config schema may have changed.","Validate the outlier detection fields in the management server's CDS resource (successRateMinimumHosts, interval, etc. must be within valid ranges)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"// This error surfaces from UpdateClientConnState in the CDS balancer.\n// It propagates as TRANSIENT_FAILURE on the channel. Unwrap to find the\n// specific outlier detection sub-error:\nerr := getBalancerError() // your observability layer\nvar odErr error\nif errors.As(err, &odErr) {\n    if strings.Contains(odErr.Error(), \"Outlier Detection\") {\n        // inspect the OD config from the management server\n    }\n}","preventionTips":["Ensure the outlier detection balancer is imported and registered.","Validate outlier detection config fields in the management server before deploying.","Keep client and server grpc-go/xDS versions in sync to avoid schema mismatches."],"tags":["xds","outlier-detection","cds","config"],"backgroundTag":null,"analyzedSha":"0c51461d27177d997e14c642fe18c11668fc09a3","analyzedAt":"2026-08-11T14:49:15.055Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}