From 200d4dae2acab95fef17e81b539966ab8c0f6868 Mon Sep 17 00:00:00 2001 From: rabi Date: Wed, 17 Nov 2021 20:54:11 +0530 Subject: [PATCH] Respect isolcpus kernel_args When ContainerCpusetCpus THT parameter is not provided (cupset_cpus='all') for a role, respect isolcpus kernel_args. Change-Id: I0eba81918ae1ed285e880e32b7e64234be511c9a --- paunch/builder/podman.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/paunch/builder/podman.py b/paunch/builder/podman.py index 43add52..c5a3e3f 100644 --- a/paunch/builder/podman.py +++ b/paunch/builder/podman.py @@ -92,14 +92,13 @@ class PodmanBuilder(base.BaseBuilder): for extra_host in cconfig.get('extra_hosts', []): if extra_host: cmd.append('--add-host=%s' % extra_host) - if 'cpuset_cpus' in cconfig: + if 'cpuset_cpus' in cconfig and cconfig['cpuset_cpus'] != 'all': # 'all' is a special value to directly configure all CPUs # that are available. Without specifying --cpuset-cpus, we'll # let the container engine to figure out what CPUs are online. # https://bugs.launchpad.net/tripleo/+bug/1868135 # https://bugzilla.redhat.com/show_bug.cgi?id=1813091 - if cconfig['cpuset_cpus'] != 'all': - cmd.append('--cpuset-cpus=%s' % cconfig['cpuset_cpus']) + cmd.append('--cpuset-cpus=%s' % cconfig['cpuset_cpus']) else: with open('/proc/cmdline') as cmdline: if 'isolcpus' in cmdline.read():