cilium/cilium · error

invalid version info

Error message

invalid version info

What it means

ErrInvalidVersionInfo is the sentinel error returned when a request's version info is not a positive integer. The server tracks resource versions numerically and uses the request's version_info to decide whether the client is up to date, so a version that cannot be parsed as a positive integer makes incremental processing impossible.

Source

Thrown at pkg/envoy/xds/server.go:48

	AnyTypeURL = ""
)

var (
	// ErrNoADSTypeURL is the error returned when receiving a request without
	// a type URL from an ADS stream.
	ErrNoADSTypeURL = errors.New("type URL is required for ADS")

	// ErrMismatchingTypeURL is the error returned when receiving a request with
	// an unexpected type URL.
	ErrMismatchingTypeURL = errors.New("mismatching type URL")

	// ErrUnknownTypeURL is the error returned when receiving a request with
	// an unknown type URL.
	ErrUnknownTypeURL = errors.New("unknown type URL")

	// ErrInvalidVersionInfo is the error returned when receiving a request
	// with a version info that is not a positive integer.
	ErrInvalidVersionInfo = errors.New("invalid version info")

	// ErrInvalidResponseNonce is returned when a request carries a response
	// nonce that does not match the outstanding response.
	ErrInvalidResponseNonce = errors.New("invalid response nonce info")

	// ErrInvalidNodeFormat is the error returned when receiving a request
	// with a node that is not a formatted correctly.
	ErrInvalidNodeFormat = errors.New("invalid node format")

	// ErrResourceWatch is the error returned whenever an internal error
	// occurs while waiting for new versions of resources.
	ErrResourceWatch = errors.New("resource watch failed")

	// grpcCanceled is the string prefix of any gRPC error related
	// to the stream being canceled. Ignore the description, as it
	// is derived from the client and may vary, while the code is
	// set by the gRPC library we link with.
	//

View on GitHub (pinned to ac7b90affa)

Solutions

  1. Echo back verbatim the VersionInfo from the last response received on the stream when ACKing.
  2. Leave VersionInfo empty only for the initial request; never send arbitrary strings.
  3. Fix custom client code that generates its own version identifiers.

Example fix

// before
req := &discovery.DiscoveryRequest{VersionInfo: "v1.2.3-rc1", TypeUrl: clusterType}

// after
req := &discovery.DiscoveryRequest{VersionInfo: lastResponse.VersionInfo, TypeUrl: clusterType} // numeric, e.g. "42"
Defensive patterns

Strategy: validation

Validate before calling

v := req.GetVersionInfo()
if v != "" {
    if n, err := strconv.Atoi(v); err != nil || n <= 0 {
        return status.Errorf(codes.InvalidArgument, "version_info must be a positive integer, got %q", v)
    }
}

Type guard

func isValidVersionInfo(v string) bool {
    if v == "" { return true } // empty allowed only on the initial request
    n, err := strconv.Atoi(v)
    return err == nil && n > 0
}

Try / catch

err := stream.Send(req)
if err != nil && strings.Contains(err.Error(), "invalid version info") {
    // reset req.VersionInfo to lastResponse.VersionInfo and resend
}

Prevention

When it happens

Trigger: processRequestStream (SotW path only, per the returner list) receives a DiscoveryRequest whose VersionInfo is non-empty but not parseable as a positive integer (e.g. letters, negative numbers, or a formatted version string).

Common situations: A custom client sends its own opaque version strings (e.g. git SHAs or timestamps) instead of echoing the numeric version from the last response; a client fabricates "0" or "-1" as an initial version.

Related errors


AI-assisted analysis of cilium/cilium@ac7b90affa (2026-08-31). Data as JSON: /api/errors/bc3bc2b2aa45a64e. Report an issue: GitHub.