Show detailed grub update logs

Show detailed logs that indicate which kernel
arguments have been updated in order to assist in
determining reboot cause. kernel arguments require
a reboot that affects performance and timing

Test plan:

PASS - AIO-SX: iso install
PASS - AIO-SX: manually edit kernel parameters and trigger puppet audit
               observe logs and reboot

Closes-Bug : 2089028

Change-Id: I721cadf3dfb725bf3722eacca7a039cf3c4e31d1
Signed-off-by: Kyale, Eliud <Eliud.Kyale@windriver.com>
This commit is contained in:
Kyale, Eliud 2024-11-19 09:51:35 -05:00
parent f5b83fe391
commit e01bfe5fed
2 changed files with 3 additions and 1 deletions
puppet-manifests/src/modules/platform
lib/puppet/parser/functions
manifests

@ -25,7 +25,7 @@ module Puppet::Parser::Functions
expected.split().each do |element|
value = cmd_array.include?(element)
if value == false
Puppet.debug("#{element} is not presented in #{cmd}")
Puppet.info("#{element} is not presented in #{cmd}")
return value
end
end

@ -143,6 +143,8 @@ class platform::compute::grub::update
logoutput => true,
}
} elsif($::osfamily == 'Debian') {
notice("Removing kernel args: ${to_be_removed}")
notice("Adding kernel args: ${truncated_grub_updates}")
exec { 'Remove the cpu arguments from /boot/efi/EFI/BOOT/boot.env':
command => "/usr/local/bin/puppet-update-grub-env.py --remove-kernelparams '${to_be_removed}'",
}