kubernetes/kops · error

unknown url for runc version: %s - %s

Error message

unknown url for runc version: %s - %s

What it means

After the arch switch, the code double-checks that a non-empty URL was constructed. If the fmt.Sprintf for the matched architecture produced an empty string (e.g. the corresponding runcVersionUrl constant is empty or the version formatted to nothing), this guard fires. Unlike the arch error, the architecture itself was recognized.

Source

Thrown at pkg/nodemodel/wellknownassets/runc.go:95

	if err != nil {
		return "", fmt.Errorf("unable to parse version string: %q", version)
	}
	if sv.LT(semver.MustParse("1.1.0")) {
		return "", fmt.Errorf("unsupported runc version: %q", version)
	}

	var u string
	switch arch {
	case architectures.ArchitectureAmd64:
		u = fmt.Sprintf(runcVersionUrlAmd64, version)
	case architectures.ArchitectureArm64:
		u = fmt.Sprintf(runcVersionUrlArm64, version)
	default:
		return "", fmt.Errorf("unknown arch: %q", arch)
	}

	if u == "" {
		return "", fmt.Errorf("unknown url for runc version: %s - %s", arch, version)
	}

	return u, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify the runcVersionUrlAmd64/Arm64 constants are populated in your kOps build.
  2. Pass a concrete runc version string (e.g. "1.1.12").
  3. Report an upstream bug if this occurs with an official kOps release, since both constants are normally hard-coded.
Defensive patterns

Strategy: validation

Validate before calling

if version == "" {
    return errors.New("runc version must be non-empty")
}
if _, err := semver.ParseTolerant(version); err != nil {
    return err
}

Try / catch

u, err := FindRuncAsset(arch, version)
if err != nil && strings.Contains(err.Error(), "unknown url") {
    // fall back to bundled/default asset or surface a config bug
}

Prevention

When it happens

Trigger: FindRuncAsset called with a recognized arch whose runcVersionUrlAmd64/runcVersionUrlArm64 template is empty, or an empty/blank version string that formats the URL to an empty value despite passing semver parsing.

Common situations: Custom kOps builds with blanked URL constants; unit tests injecting empty templates; unusual version strings that slip through ParseTolerant.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/0036cb09836892fd. Report an issue: GitHub.