grpc/grpc-go · error
rls_csp: validation error from rls lb policy parsing: %v
Error message
rls_csp: validation error from rls lb policy parsing: %v
What it means
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.
Source
Thrown at internal/xds/clusterspecifier/rls/rls.go:91
ChildPolicy: []map[string]json.RawMessage{
{
"cds_experimental": json.RawMessage(`{"isDynamic":true}`),
},
},
ChildPolicyConfigTargetFieldName: "cluster",
}
rawJSON, err := json.Marshal(lbCfgJSON)
if err != nil {
return nil, fmt.Errorf("rls_csp: error marshaling load balancing config %v: %v", lbCfgJSON, err)
}
rlsBB := balancer.Get(internal.RLSLoadBalancingPolicyName)
if rlsBB == nil {
return nil, fmt.Errorf("RLS LB policy not registered")
}
if _, err = rlsBB.(balancer.ConfigParser).ParseConfig(rawJSON); err != nil {
return nil, fmt.Errorf("rls_csp: validation error from rls lb policy parsing: %v", err)
}
return clusterspecifier.BalancerConfig{{internal.RLSLoadBalancingPolicyName: lbCfgJSON}}, nil
}
View on GitHub (pinned to 03255a9237)
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.
Defensive patterns
Strategy: validation
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- rls_csp: nil configuration message provided
- rls_csp: error parsing config %v: %v
- RLS LB policy not registered
- missing server_listener_resource_name_template in the bootst
- no priority is provided, all priorities are removed
AI-assisted analysis of grpc/grpc-go@03255a9237 (2026-08-07).
Data as JSON: /api/errors/887d7bd8fb64890b.
Report an issue: GitHub.