{"record":{"id":"887d7bd8fb64890b","repo":"grpc/grpc-go","slug":"rls-csp-validation-error-from-rls-lb-policy-parsi","errorCode":null,"errorMessage":"rls_csp: validation error from rls lb policy parsing: %v","messagePattern":"rls_csp: validation error from rls lb policy parsing: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/clusterspecifier/rls/rls.go","lineNumber":91,"sourceCode":"\t\tChildPolicy: []map[string]json.RawMessage{\n\t\t\t{\n\t\t\t\t\"cds_experimental\": json.RawMessage(`{\"isDynamic\":true}`),\n\t\t\t},\n\t\t},\n\t\tChildPolicyConfigTargetFieldName: \"cluster\",\n\t}\n\n\trawJSON, err := json.Marshal(lbCfgJSON)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"rls_csp: error marshaling load balancing config %v: %v\", lbCfgJSON, err)\n\t}\n\n\trlsBB := balancer.Get(internal.RLSLoadBalancingPolicyName)\n\tif rlsBB == nil {\n\t\treturn nil, fmt.Errorf(\"RLS LB policy not registered\")\n\t}\n\tif _, err = rlsBB.(balancer.ConfigParser).ParseConfig(rawJSON); err != nil {\n\t\treturn nil, fmt.Errorf(\"rls_csp: validation error from rls lb policy parsing: %v\", err)\n\t}\n\n\treturn clusterspecifier.BalancerConfig{{internal.RLSLoadBalancingPolicyName: lbCfgJSON}}, nil\n}\n","sourceCodeStart":73,"sourceCodeEnd":96,"githubUrl":"https://github.com/grpc/grpc-go/blob/03255a9237b6eb32710f6bc4f2de9a675b99fe36/internal/xds/clusterspecifier/rls/rls.go#L73-L96","documentation":"Returned when the RLS balancer's ConfigParser.ParseConfig rejects the JSON assembled by the cluster specifier plugin (RouteLookupConfig JSON plus the hardcoded cds_experimental child policy). The plugin pre-validates by asking the RLS balancer to parse the config; any rejection propagates as this error.","triggerScenarios":"The server-supplied RouteLookupConfig, while serializable, is semantically invalid per the RLS LB policy — e.g. missing grpc_keybuilders, empty lookup_service, invalid child policy target field, or a malformed lookup_service_timeout.","commonSituations":"Control plane pushing an incomplete RLS config (missing required fields), version skew between the RLS proto the server used and the balancer's validator, or a hand-crafted config that omits required RLS fields.","solutions":["Read the wrapped %v (the RLS balancer's parse error) — it names the missing/invalid field.","Fix the RouteLookupConfig on the server to include all fields the RLS LB policy requires (grpc_keybuilders, lookup_service, etc.).","Align client and server gRPC/RLS versions so the validator's expectations match."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Populate all required RouteLookupConfig fields (grpc_keybuilders, lookup_service).","Read the wrapped RLS balancer parse error to identify the offending field.","Keep client and server gRPC/RLS versions aligned."],"tags":["grpc","xds","rls","balancer","config"],"analyzedSha":"03255a9237b6eb32710f6bc4f2de9a675b99fe36","analyzedAt":"2026-08-07T00:29:34.215Z","schemaVersion":2},"datasetVersion":"2026-08-07T03:17:09.362Z"}