Nohz_full configuration hieradata needs to be updated
The grub commandline parameters contains nohz_full grub which needs to be updated with something different than a cpu list for kernel isolation when the user decides to disable it by assigning the disable-nohz-full label. In this manner, the disabled string can be used to signal the kernel to restore this configuration to default. Closes-Bug: 1981762 Test plan: PASS: Disable nohz_full configuration in a standard worker by enabling disable-nohz-full label. PASS: Verify that /etc/default/grub doesn't contains nohz_full parameter. PASS: Verify that /sys/devices/system/cpu/nohz_full was restored to default. PASS: Enable nohz_full configuration in a standard worker by removing disable-nohz-full label. PASS: Verify that /sys/devices/system/cpu/nohz_full has the cpulist. PASS: Remove label and verify alarms and system overall health. PASS: Add label and verify alarms and system overall health. Signed-off-by: Iago Estrela <IagoFilipe.EstrelaBarros@windriver.com> Change-Id: I00b68faae2612088b8e2fe7aeb3900babe638ca0
This commit is contained in:
parent
fb7eb9664c
commit
705077ed56
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2018-2020 Wind River Systems, Inc.
|
||||
# Copyright (c) 2018-2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@ -152,6 +152,11 @@ class LabelController(rest.RestController):
|
||||
sort_key=sort_key,
|
||||
sort_dir=sort_dir)
|
||||
|
||||
def _apply_manifest_after_label_operation(self, uuid, keys):
|
||||
if common.LABEL_DISABLE_NOHZ_FULL in keys:
|
||||
pecan.request.rpcapi.update_grub_config(
|
||||
pecan.request.context, uuid)
|
||||
|
||||
@wsme_pecan.wsexpose(LabelCollection, types.uuid, types.uuid,
|
||||
int, wtypes.text, wtypes.text)
|
||||
def get_all(self, uuid=None, marker=None, limit=None,
|
||||
@ -260,6 +265,8 @@ class LabelController(rest.RestController):
|
||||
uuid,
|
||||
host.hostname,
|
||||
constants.VIM_DEFAULT_TIMEOUT_IN_SECS)
|
||||
self._apply_manifest_after_label_operation(
|
||||
uuid, body.keys())
|
||||
except Exception as e:
|
||||
LOG.warn(_("No response vim_api host:%s e=%s" %
|
||||
(host.hostname, e)))
|
||||
@ -307,6 +314,8 @@ class LabelController(rest.RestController):
|
||||
host.uuid,
|
||||
host.hostname,
|
||||
constants.VIM_DEFAULT_TIMEOUT_IN_SECS)
|
||||
self._apply_manifest_after_label_operation(
|
||||
host.uuid, [lbl_obj.label_key])
|
||||
except Exception as e:
|
||||
LOG.warn(_("No response vim_api host:%s e=%s" %
|
||||
(host.hostname, e)))
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2017-2020 Wind River Systems, Inc.
|
||||
# Copyright (c) 2017-2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@ -553,6 +553,8 @@ class PlatformPuppet(base.BasePuppet):
|
||||
cpu_ranges.update({"nohz_full": isolcpus_ranges})
|
||||
else:
|
||||
cpu_ranges.update({"nohz_full": rcu_nocbs_ranges})
|
||||
else:
|
||||
cpu_ranges.update({'nohz_full': 'disabled'})
|
||||
|
||||
cpu_ranges.update({
|
||||
"isolcpus": isolcpus_ranges,
|
||||
|
Loading…
x
Reference in New Issue
Block a user