kubernetes/kops · error
unsupported systemd system
Error message
unsupported systemd system
What it means
After successful distro detection, systemdSystemPath only knows unit paths for Debian-family, RHEL-family, Flatcar, and Container-Optimized OS. If the detected distribution falls outside those four branches, the task refuses to guess a unit directory and returns "unsupported systemd system".
Source
Thrown at upup/pkg/fi/nodeup/nodetasks/service.go:181
return properties, nil
}
func (_ *Service) systemdSystemPath() (string, error) {
d, err := distributions.FindDistribution("/")
if err != nil {
return "", fmt.Errorf("unknown or unsupported distro: %v", err)
}
if d.IsDebianFamily() {
return debianSystemdSystemPath, nil
} else if d.IsRHELFamily() {
return centosSystemdSystemPath, nil
} else if d == distributions.DistributionFlatcar {
return flatcarSystemdSystemPath, nil
} else if d == distributions.DistributionContainerOS {
return containerosSystemdSystemPath, nil
} else {
return "", fmt.Errorf("unsupported systemd system")
}
}
func (e *InstallService) Find(_ *fi.InstallContext) (*InstallService, error) {
actual, err := e.Service.Find(nil)
if actual == nil || err != nil {
return nil, err
}
return &InstallService{*actual}, nil
}
func (e *Service) Find(_ *fi.NodeupContext) (*Service, error) {
systemdSystemPath, err := e.systemdSystemPath()
if err != nil {
return nil, err
}
servicePath := path.Join(systemdSystemPath, e.Name)
View on GitHub (pinned to 4c8573c808)
Solutions
- Use a distro in the supported set (Debian/Ubuntu, RHEL/CentOS/Rocky/Amazon Linux, Flatcar, COS)
- Upgrade kOps/nodeup to a version that maps your distro's systemd path
- Patch the else branch in service.go systemdSystemPath to add a mapping for your distro
- Confirm the image actually is what you think (check `cat /etc/os-release`) — a mislabeled image can land in an unmapped branch
Example fix
// before
} else {
return "", fmt.Errorf("unsupported systemd system")
}
// after
} else if d == distributions.DistributionMyDistro {
return "/etc/systemd/system", nil
} else {
return "", fmt.Errorf("unsupported systemd system")
} Defensive patterns
Strategy: validation
Validate before calling
// Before creating Service tasks, check the distro maps to a supported branch:
d, err := distributions.FindDistribution("/")
if err != nil { return err }
supported := d.IsDebianFamily() || d.IsRHELFamily() ||
d == distributions.DistributionFlatcar || d == distributions.DistributionContainerOS
if !supported { return fmt.Errorf("distro %v has no systemd path mapping", d) } Try / catch
if _, err := svc.systemdSystemPath(); err != nil {
if strings.Contains(err.Error(), "unsupported systemd system") {
return fmt.Errorf("distro lacks systemd path mapping: %w", err)
}
return err
} Prevention
- Use only Debian/RHEL family, Flatcar, or COS node images
- Upgrade nodeup when adopting new distros so path mappings exist
- Sanity-check /etc/os-release ID/ID_LIKE on custom images
When it happens
Trigger: Find or RenderLocal on a Service task where distributions.FindDistribution("/") returns a distro value that is recognized but is neither Debian-family, RHEL-family, Flatcar, nor ContainerOS (e.g. a distro added to the detection list without a systemd path mapping).
Common situations: Running kOps nodeup on a newly supported distro whose path constant was not yet added, or experimental images (e.g. some Fedora variants classified oddly) where detection succeeds but no branch matches.
Related errors
- unknown or unsupported distro: %v
- error building kubelet flags: %v
- failed to create bpf mount unit: %w
- failed to create cgroupv2 mount unit: %w
- error running tasks: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/27a34459a86f29d1.
Report an issue: GitHub.