The issue you’re seeing — cpu-manager-policy not being applied after reboot in v1.3.2 — is likely related to a regression or a timing issue with how the kubelet state is initialized on Harvester’s immutable OS. Here are the key troubleshooting steps and observations:
Root cause of the likely issue:
Your /oem/90_custom.yaml includes rm /var/lib/kubelet/cpu_manager_state || true in initramfs commands, which should delete the stale state file before kubelet starts. However, in Harvester 1.3.x, the initramfs stage may run at a different point relative to when RKE2/kubelet initializes, causing the state file to be regenerated with the default none policy before the kubelet args take effect.
Checks to perform:
-
Verify kubelet is actually receiving the args:
-
bash -
ps aux | grep kubelet | grep cpu-manager
-
If `cpu-manager-policy=static` doesn't appear, the kubelet args from `90-harvester-server.yaml` are not being passed correctly. -
Check the kubelet arg config path:
-
In Harvester v1.3.x, the kubelet args in RKE2 config are processed differently than in v1.4+. Verify that
/etc/rancher/rke2/config.yaml.d/90-harvester-server.yamlis being read at startup: -
bash -
journalctl -u rke2-server | grep cpu-manager
-
-
- State file timing:
- The
cpu_manager_statefile must be deleted before kubelet starts. If yourinitramfscommands run before kubelet but after the file is created by a previous run, it should work. Try also adding the delete in thebootstage as a fallback: -
yaml - stages:
- boot:
-
- commands:
-
- rm -f /var/lib/kubelet/cpu_manager_state
-
- KubeVirt CPUManager feature gate:
- Your KubeVirt config has
CPUManagerin featureGates — good. But also verify the KubeVirt CPUAllocationRatio is set appropriately for dedicated CPU pinning.
-
Note on v1.3.2 vs v1.4.0:
-
Since you mentioned this worked on v1.4.0-dev, this suggests a bug in v1.3.2’s handling of kubelet args or the initramfs stage ordering. Consider upgrading to v1.4.x or later where this was fixed.
Reference: Official Harvester docs > Advanced > Single Node Clusters and the Harvester GitHub issue tracker