From e276cac4289b7355a72fdd68d2f7631d254596c5 Mon Sep 17 00:00:00 2001 From: Kaustubh Dhokte Date: Tue, 13 Feb 2024 18:20:34 +0000 Subject: [PATCH] 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 --- .../sysinv/sysinv/sysinv/common/constants.py | 1 - .../sysinv/sysinv/sysinv/puppet/kubernetes.py | 18 +++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/sysinv/sysinv/sysinv/sysinv/common/constants.py b/sysinv/sysinv/sysinv/sysinv/common/constants.py index fa2c72a9e6..8766b9df89 100644 --- a/sysinv/sysinv/sysinv/sysinv/common/constants.py +++ b/sysinv/sysinv/sysinv/sysinv/common/constants.py @@ -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 diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/kubernetes.py b/sysinv/sysinv/sysinv/sysinv/puppet/kubernetes.py index 8fb1507789..f98b4c1c6e 100644 --- a/sysinv/sysinv/sysinv/sysinv/puppet/kubernetes.py +++ b/sysinv/sysinv/sysinv/sysinv/puppet/kubernetes.py @@ -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