grpc/grpc-go · error
OutlierDetectionLoadBalancingConfig.SuccessRateEjection.enfo
Error message
OutlierDetectionLoadBalancingConfig.SuccessRateEjection.enforcement_percentage = %v; must be <= 100
What it means
Returned by outlier detection ParseConfig (internal/xds/balancer/outlierdetection/balancer.go:144) when the optional `success_rate_ejection` block is present and its `enforcement_percentage` exceeds 100. gRFC A50 caps this field at 100; it controls the probability that a detected outlier is actually ejected.
Source
Thrown at internal/xds/balancer/outlierdetection/balancer.go:145
// Approximately 290 years is the maximum time that time.Duration (int64)
// can represent. The restrictions on the protobuf.Duration field are to be
// within +-10000 years. Thus, just check for negative values.
case lbCfg.Interval < 0:
return nil, fmt.Errorf("OutlierDetectionLoadBalancingConfig.interval = %s; must be >= 0", lbCfg.Interval)
case lbCfg.BaseEjectionTime < 0:
return nil, fmt.Errorf("OutlierDetectionLoadBalancingConfig.base_ejection_time = %s; must be >= 0", lbCfg.BaseEjectionTime)
case lbCfg.MaxEjectionTime < 0:
return nil, fmt.Errorf("OutlierDetectionLoadBalancingConfig.max_ejection_time = %s; must be >= 0", lbCfg.MaxEjectionTime)
// "The fields max_ejection_percent,
// success_rate_ejection.enforcement_percentage,
// failure_percentage_ejection.threshold, and
// failure_percentage.enforcement_percentage must have values less than or
// equal to 100." - A50
case lbCfg.MaxEjectionPercent > 100:
return nil, fmt.Errorf("OutlierDetectionLoadBalancingConfig.max_ejection_percent = %v; must be <= 100", lbCfg.MaxEjectionPercent)
case lbCfg.SuccessRateEjection != nil && lbCfg.SuccessRateEjection.EnforcementPercentage > 100:
return nil, fmt.Errorf("OutlierDetectionLoadBalancingConfig.SuccessRateEjection.enforcement_percentage = %v; must be <= 100", lbCfg.SuccessRateEjection.EnforcementPercentage)
case lbCfg.FailurePercentageEjection != nil && lbCfg.FailurePercentageEjection.Threshold > 100:
return nil, fmt.Errorf("OutlierDetectionLoadBalancingConfig.FailurePercentageEjection.threshold = %v; must be <= 100", lbCfg.FailurePercentageEjection.Threshold)
case lbCfg.FailurePercentageEjection != nil && lbCfg.FailurePercentageEjection.EnforcementPercentage > 100:
return nil, fmt.Errorf("OutlierDetectionLoadBalancingConfig.FailurePercentageEjection.enforcement_percentage = %v; must be <= 100", lbCfg.FailurePercentageEjection.EnforcementPercentage)
}
return lbCfg, nil
}
func (bb) Name() string {
return Name
}
// scUpdate wraps a subConn update to be sent to the child balancer.
type scUpdate struct {
scw *subConnWrapper
state balancer.SubConnState
}
View on GitHub (pinned to 03255a9237)
Solutions
- Set `successRateEjection.enforcementPercentage` to 0-100 (omit the block to disable success-rate ejection)
- Correct the upstream OutlierDetection success_rate_ejection config
- Validate percentage fields against the 0-100 range before publishing
Example fix
// before
{"successRateEjection":{"enforcementPercentage":150}}
// after
{"successRateEjection":{"enforcementPercentage":100}} Defensive patterns
Strategy: validation
Validate before calling
var probe struct{ SRE struct{ EnforcementPercentage uint32 `json:"enforcement_percentage"` } `json:"success_rate_ejection"` }
_ = json.Unmarshal(raw, &probe)
if probe.SRE.EnforcementPercentage > 100 {
return fmt.Errorf("success_rate enforcement_percentage must be <= 100, got %d", probe.SRE.EnforcementPercentage)
} Try / catch
lbCfg, err := outlierBB.ParseConfig(raw)
if err != nil {
logger.Warningf("rejecting outlier detection config: %v", err)
return fallbackLBConfig
} Prevention
- Remember enforcement_percentage is 0-100, not a fraction
- Validate only when the success_rate_ejection block is present
When it happens
Trigger: ParseConfig gets JSON containing a `successRateEjection` object whose `enforcementPercentage` is > 100. Only checked when the success_rate_ejection block is non-nil.
Common situations: Control plane emits enforcement_percentage as a fraction (e.g. 1000 meaning 100%) instead of a 0-100 integer; misconfigured outlier detection policy.
Related errors
- OutlierDetectionLoadBalancingConfig.interval = %s; must be >
- OutlierDetectionLoadBalancingConfig.base_ejection_time = %s;
- OutlierDetectionLoadBalancingConfig.max_ejection_time = %s;
- OutlierDetectionLoadBalancingConfig.max_ejection_percent = %
- OutlierDetectionLoadBalancingConfig.FailurePercentageEjectio
AI-assisted analysis of grpc/grpc-go@03255a9237 (2026-08-07).
Data as JSON: /api/errors/47cfcbc30f05c061.
Report an issue: GitHub.