{"record":{"id":"27a34459a86f29d1","repo":"kubernetes/kops","slug":"unsupported-systemd-system","errorCode":null,"errorMessage":"unsupported systemd system","messagePattern":"unsupported systemd system","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/nodeup/nodetasks/service.go","lineNumber":181,"sourceCode":"\treturn properties, nil\n}\n\nfunc (_ *Service) systemdSystemPath() (string, error) {\n\td, err := distributions.FindDistribution(\"/\")\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"unknown or unsupported distro: %v\", err)\n\t}\n\n\tif d.IsDebianFamily() {\n\t\treturn debianSystemdSystemPath, nil\n\t} else if d.IsRHELFamily() {\n\t\treturn centosSystemdSystemPath, nil\n\t} else if d == distributions.DistributionFlatcar {\n\t\treturn flatcarSystemdSystemPath, nil\n\t} else if d == distributions.DistributionContainerOS {\n\t\treturn containerosSystemdSystemPath, nil\n\t} else {\n\t\treturn \"\", fmt.Errorf(\"unsupported systemd system\")\n\t}\n}\n\nfunc (e *InstallService) Find(_ *fi.InstallContext) (*InstallService, error) {\n\tactual, err := e.Service.Find(nil)\n\tif actual == nil || err != nil {\n\t\treturn nil, err\n\t}\n\treturn &InstallService{*actual}, nil\n}\nfunc (e *Service) Find(_ *fi.NodeupContext) (*Service, error) {\n\tsystemdSystemPath, err := e.systemdSystemPath()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tservicePath := path.Join(systemdSystemPath, e.Name)\n","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/nodetasks/service.go#L163-L199","documentation":"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\".","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":"// before\n} else {\n\treturn \"\", fmt.Errorf(\"unsupported systemd system\")\n}\n// after\n} else if d == distributions.DistributionMyDistro {\n\treturn \"/etc/systemd/system\", nil\n} else {\n\treturn \"\", fmt.Errorf(\"unsupported systemd system\")\n}","handlingStrategy":"validation","validationCode":"// Before creating Service tasks, check the distro maps to a supported branch:\nd, err := distributions.FindDistribution(\"/\")\nif err != nil { return err }\nsupported := d.IsDebianFamily() || d.IsRHELFamily() ||\n\td == distributions.DistributionFlatcar || d == distributions.DistributionContainerOS\nif !supported { return fmt.Errorf(\"distro %v has no systemd path mapping\", d) }","typeGuard":null,"tryCatchPattern":"if _, err := svc.systemdSystemPath(); err != nil {\n\tif strings.Contains(err.Error(), \"unsupported systemd system\") {\n\t\treturn fmt.Errorf(\"distro lacks systemd path mapping: %w\", err)\n\t}\n\treturn err\n}","preventionTips":["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"],"tags":["nodeup","systemd","distro-support","unsupported-os"],"backgroundTag":"unsupported-distro","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}