I’m trying to setup CPU affinity as described in Mr Durden’s instructions here: https://github.com/bcdurden/affinity_on_harvester
My one node cluster does not show the changes to cpu manager after a reboot
harvester01:~ # cat /var/lib/kubelet/cpu_manager_state
{"policyName":"none","defaultCpuSet":"","checksum":1353318690}
I have confirmed the changes to /oem/90_custom.yaml have been propagated to 90-harvester-server.yaml and 90-harvester-agent.yaml after a reboot of my node
harvester01:~ # cat /etc/rancher/rke2/config.yaml.d/90-harvester-server.yaml
cni: multus,canal
cluster-cidr: 10.52.0.0/16
service-cidr: 10.53.0.0/16
cluster-dns: 10.53.0.10
tls-san:
- 10.0.111.4
kubelet-arg:
- "max-pods=200"
- "cpu-manager-policy=static"
- "cpu-manager-policy-options=full-pcpus-only=true"
- "cpu-manager-reconcile-period=0s"
- "reserved-cpus=2"
audit-policy-file: /etc/rancher/rke2/config.yaml.d/92-harvester-kube-audit-policy.yaml
harvester01:~ # cat /etc/rancher/rke2/config.yaml.d/90-harvester-agent.yaml
kubelet-arg:
- "max-pods=200"
- "cpu-manager-policy=static"
- "cpu-manager-policy-options=full-pcpus-only=true"
- "cpu-manager-reconcile-period=0s"
- "reserved-cpus=2"
The top of my /oem/90_custom.yaml
name: Harvester Configuration
stages:
initramfs:
- commands:
- modprobe kvm
- modprobe vhost_net
- sed -i 's/^NETCONFIG_DNS_STATIC_SERVERS.*/NETCONFIG_DNS_STATIC_SERVERS="10.0.111.10"/' /etc/sysconfig/network/config
- rm -f /etc/sysconfig/network/ifroute-mgmt-br
- rm /var/lib/kubelet/cpu_manager_state || true
- sysctl -w vm.nr_hugepages=16784
and my kubevirt config
spec:
certificateRotateStrategy: {}
configuration:
developerConfiguration:
featureGates:
- LiveMigration
- HotplugVolumes
- HostDevices
- GPU
- NUMA
- CPUManager
Any idea where to look? It seems the cpu manager is not getting the config changes. These same changes worked on 1.4.0-dev by the way.