{"record":{"id":"92b67921650e3d1b","repo":"kubernetes/kubernetes","slug":"unable-to-discover-cpu-topology-info-s","errorCode":null,"errorMessage":"unable to discover CPU topology info: %s","messagePattern":"unable to discover CPU topology info: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kubelet/app/server.go","lineNumber":643,"sourceCode":"\teventBroadcaster.StartStructuredLogging(3)\n\tif kubeDeps.EventClient != nil {\n\t\tlogger.V(4).Info(\"Sending events to api server\")\n\t\teventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeDeps.EventClient.Events(\"\")})\n\t} else {\n\t\tlogger.Info(\"No api server defined - no events will be sent to API server\")\n\t}\n}\n\nfunc getReservedCPUs(logger klog.Logger, machineInfo *cadvisorapi.MachineInfo, cpus string) (cpuset.CPUSet, error) {\n\temptyCPUSet := cpuset.New()\n\n\tif cpus == \"\" {\n\t\treturn emptyCPUSet, nil\n\t}\n\n\ttopo, err := topology.Discover(logger, machineInfo)\n\tif err != nil {\n\t\treturn emptyCPUSet, fmt.Errorf(\"unable to discover CPU topology info: %s\", err)\n\t}\n\treservedCPUSet, err := cpuset.Parse(cpus)\n\tif err != nil {\n\t\treturn emptyCPUSet, fmt.Errorf(\"unable to parse reserved-cpus list: %s\", err)\n\t}\n\tallCPUSet := topo.CPUDetails.CPUs()\n\tif !reservedCPUSet.IsSubsetOf(allCPUSet) {\n\t\treturn emptyCPUSet, fmt.Errorf(\"reserved-cpus: %s is not a subset of online-cpus: %s\", cpus, allCPUSet.String())\n\t}\n\treturn reservedCPUSet, nil\n}\n\nfunc run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate featuregate.FeatureGate) (err error) {\n\tlogger := klog.FromContext(ctx)\n\t// NewHealthChecker returns an error indicating that the watchdog is configured but the configuration is incorrect,\n\t// the kubelet will not be started.\n\thealthChecker, err := watchdog.NewHealthChecker(logger)\n\tif err != nil {","sourceCodeStart":625,"sourceCodeEnd":661,"githubUrl":"https://github.com/kubernetes/kubernetes/blob/b882c60b4023bdf09264c2d5d30a2cadebc240fb/cmd/kubelet/app/server.go#L625-L661","documentation":"From getReservedCPUs (server.go:641-643): topology.Discover failed while building the CPU topology needed to validate --reserved-cpus. Discover reads /sys/devices/system/cpu/* (and NUMA info) to learn which CPUs exist and their attributes, so failure means the kernel's sysfs CPU topology could not be parsed.","triggerScenarios":"Triggered only when --reserved-cpus is non-empty AND topology.Discover errors — i.e. the kubelet is configured for static CPU management with reserved CPUs but cannot enumerate online CPUs from sysfs. Common on misconfigured containers or unusual kernels where /sys is not mounted or CPU entries are inconsistent.","commonSituations":"Running kubelet in a container without /sys mounted read-only; a kernel/driver bug producing inconsistent /sys/devices/system/cpu entries; hotplug races during discovery; highly virtualized environments exposing a weird topology.","solutions":["Ensure /sys is mounted and readable in the kubelet's environment (`ls /sys/devices/system/cpu/`).","Update the kernel / hypervisor if sysfs CPU entries are inconsistent.","If you do not actually need reserved CPUs, clear --reserved-cpus to bypass this code path.","Retry on a stable host after any hotplug has settled."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Preflight: only set --reserved-cpus if topology can be discovered.\nif _, err := topology.Discover(logger, machineInfo); err != nil {\n    return fmt.Errorf(\"cannot use --reserved-cpus: topology discovery failed: %w\", err)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure /sys is mounted and readable wherever kubelet runs.","Omit --reserved-cpus on hosts where CPU enumeration is unreliable."],"tags":["kubelet","cpu-manager","topology","sysfs","reserved-cpus"],"analyzedSha":"b882c60b4023bdf09264c2d5d30a2cadebc240fb","analyzedAt":"2026-08-07T04:07:48.144Z","schemaVersion":2},"datasetVersion":"2026-08-07T07:17:06.508Z"}