Remove support for ignoring k8s isolated CPUs in sysinv

As we no longer have any users for this feature, we remove
support for ignoring isolated CPUs. This change removes code
that supports this feature in sysinv.

Test Plan:
AIO-SX:
PASS: Manually create /etc/kubernetes/ignore_isolcpus,
      assign host label 'kube-ignore-isol-cpus=enabled',
      yet a test pod is allocated to the application-isolated
      CPUs.

Story: 2010878
Task: 49571

Change-Id: I21d3319bd967a7a0524e922295fbcc75770a02e6
Signed-off-by: Kaustubh Dhokte <kaustubh.dhokte@windriver.com>
This commit is contained in:
Kaustubh Dhokte 2024-02-13 18:20:34 +00:00
parent ae29b180c2
commit e276cac428
2 changed files with 3 additions and 16 deletions

View File

@ -2087,7 +2087,6 @@ SRIOV_LABEL = 'sriov=enabled'
SRIOVDP_LABEL = 'sriovdp=enabled'
KUBE_TOPOLOGY_MANAGER_LABEL = 'kube-topology-mgr-policy'
KUBE_CPU_MANAGER_LABEL = 'kube-cpu-mgr-policy'
KUBE_IGNORE_ISOL_CPU_LABEL = 'kube-ignore-isol-cpus=enabled'
KUBE_POWER_MANAGER_LABEL = 'power-management'
# Accepted label values

View File

@ -566,21 +566,9 @@ class KubernetesPuppet(base.BasePuppet):
# to pass as options to kubelet
k8s_platform_cpuset = utils.format_range_set(platform_cpuset)
# determine whether to reserve isolated CPUs
reserve_isolcpus = True
labels = self.dbapi.label_get_by_host(host.uuid)
for l in labels:
if (constants.KUBE_IGNORE_ISOL_CPU_LABEL ==
str(l.label_key) + '=' + str(l.label_value)):
reserve_isolcpus = False
break
if reserve_isolcpus:
k8s_all_reserved_cpuset = utils.format_range_set(platform_cpuset |
vswitch_cpuset |
isol_cpuset)
else:
k8s_all_reserved_cpuset = utils.format_range_set(platform_cpuset |
vswitch_cpuset)
k8s_all_reserved_cpuset = utils.format_range_set(platform_cpuset |
vswitch_cpuset |
isol_cpuset)
# determine platform reserved memory
k8s_reserved_mem = 0