{"record":{"id":"4127e8a35e28817a","repo":"grpc/grpc-go","slug":"failed-to-push-config-to-child-policy-v","errorCode":null,"errorMessage":"failed to push config to child policy: %v","messagePattern":"failed to push config to child policy: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/balancer/cdsbalancer/cdsbalancer.go","lineNumber":309,"sourceCode":"\t\tfor j := range endpoints[i].Addresses {\n\t\t\taddr := endpoints[i].Addresses[j]\n\t\t\taddr.BalancerAttributes = endpoints[i].Attributes\n\t\t\t// BalancerAttributes are used for the following:\n\t\t\t// * Authority Override.\n\t\t\t// * grpc.lb.backend_service metric label propagation.\n\t\t\t// See https://github.com/grpc/grpc-go/issues/6472\n\t\t\tendpoints[i].Addresses[j] = addr\n\t\t}\n\t}\n\tif err := b.childLB.UpdateClientConnState(balancer.ClientConnState{\n\t\tResolverState: resolver.State{\n\t\t\tEndpoints:     endpoints,\n\t\t\tServiceConfig: b.serviceConfig,\n\t\t\tAttributes:    b.attributes,\n\t\t},\n\t\tBalancerConfig: childCfg,\n\t}); err != nil {\n\t\treturn fmt.Errorf(\"failed to push config to child policy: %v\", err)\n\t}\n\treturn nil\n}\n\n// updatePriorityConfig updates the priority configuration for the specified EDS\n// or DNS cluster, creating it if it does not already exist.\nfunc (b *cdsBalancer) updatePriorityConfig(clusterName string, clusterConfig *xdsresource.ClusterConfig) *priorityConfig {\n\tname := hostName(clusterName, *clusterConfig.Cluster)\n\tpc, ok := b.priorityConfigs[name]\n\tif !ok {\n\t\tpc = &priorityConfig{\n\t\t\tchildNameGen: newNameGenerator(b.childNameGeneratorSeqID),\n\t\t}\n\t\tb.priorityConfigs[name] = pc\n\t\t// Increment the seq ID for the next new cluster. This is done to make\n\t\t// sure that the child policy names generated for different clusters\n\t\t// don't conflict with each other.\n\t\tb.childNameGeneratorSeqID++","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/grpc/grpc-go/blob/0c51461d27177d997e14c642fe18c11668fc09a3/internal/xds/balancer/cdsbalancer/cdsbalancer.go#L291-L327","documentation":"Returned by updateChildConfig (line 309) when the child priority balancer's UpdateClientConnState rejects the config push. The CDS balancer calls b.childLB.UpdateClientConnState with the newly built endpoints, service config, attributes, and parsed child config (lines 301-308). If the priority balancer (or any balancer in its tree) returns an error, it is wrapped here.","triggerScenarios":"After successfully building and parsing the child config, the CDS balancer pushes it to the priority child balancer. The priority balancer may reject it if its own validation fails — e.g., the cluster_impl or outlier-detection child within the priority tree encounters an issue with the endpoints or configuration.","commonSituations":"The priority balancer's child (cluster_impl, wrrlocality, etc.) fails to process the endpoints or config. An endpoint with invalid attributes or an unsupported configuration option in the child policy tree. A transient issue during balancer state transitions.","solutions":["Examine the wrapped %v to find the specific child balancer error that caused the rejection.","Check the endpoints and child config for validity (endpoint addresses, locality weights, policy names).","Enable gRPC verbose logging (GRPC_GO_LOG_SEVERITY=info) to trace the config through the balancer tree.","If the error is from cluster_impl (e.g., security config issue), follow the remediation for that specific error."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// UpdateClientConnState error propagates to TRANSIENT_FAILURE.\n// Unwrap to find the specific child policy rejection:\nerr := getChannelError(conn)\nif err != nil {\n    var childErr error\n    if errors.As(err, &childErr) {\n        log.Printf(\"child policy rejected config: %v\", childErr)\n        // inspect child balancer type in logs\n    }\n}","preventionTips":["Validate cluster and endpoint data on the management server.","Enable gRPC info-level logging to trace config through the balancer tree.","Keep client and server xDS protocol versions aligned."],"tags":["xds","child-policy","config-push","priority","balancer"],"backgroundTag":null,"analyzedSha":"0c51461d27177d997e14c642fe18c11668fc09a3","analyzedAt":"2026-08-11T14:49:15.055Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}