kubernetes/kops · error

error determining OS distribution: %v

Error message

error determining OS distribution: %v

What it means

Wraps a failure of distributions.FindDistribution('/') during nodeup bootstrap installation: the Linux distribution of the node could not be identified from the filesystem, so OS-specific install tasks cannot be selected.

Source

Thrown at nodeup/pkg/bootstrap/install.go:45

	"k8s.io/kops/upup/pkg/fi"
	"k8s.io/kops/upup/pkg/fi/nodeup/install"
	"k8s.io/kops/upup/pkg/fi/nodeup/nodetasks"
	"k8s.io/kops/util/pkg/distributions"
	"k8s.io/kops/util/pkg/vfs/openstackconfig"
)

type Installation struct {
	CacheDir        string
	RunTasksOptions fi.RunTasksOptions
	Command         []string
}

func (i *Installation) Run() error {
	ctx := context.TODO()

	_, err := distributions.FindDistribution("/")
	if err != nil {
		return fmt.Errorf("error determining OS distribution: %v", err)
	}

	tasks := make(map[string]fi.InstallTask)

	buildContext := &fi.InstallModelBuilderContext{
		Tasks: tasks,
	}
	i.Build(buildContext)

	target := &install.InstallTarget{}

	context, err := fi.NewInstallContext(ctx, target, tasks)
	if err != nil {
		return fmt.Errorf("error building context: %v", err)
	}

	err = context.RunTasks(i.RunTasksOptions)
	if err != nil {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify /etc/os-release exists and is readable
  2. Use a kOps-supported distribution
  3. Check that nodeup runs on the target node, not a builder
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at nodeup/pkg/bootstrap/install.go:45 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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