ncsa / puppet-profile_update_os

NCSA Common Puppet Profiles - configure functionality for upgrading OS packages
0 stars 0 forks source link

ASDPLNG-125: Fix typos/bugs, add update notices, update yum exclude #2

Closed billglick closed 3 years ago

billglick commented 3 years ago
Fix typos in motd notice for 'any/all', weeks, repeated 'the'
Add timezone to motd notice
Default week moved to '2'
Add 1, 24, & 48 hour wall warnings
Switch update_hour & update_minute parameters to INT for math
Clean up cron command for dnf-automatic
Change yum exclude to only kernel
Change *::update_months parameter names to plural
Move common class into init
Move scripts into $root_cron_scripts_dir parameter
Change yum_cron::exclude to excluded_packages array
Replace kernel_upgrade::nowait with random_delay that is passed to script as --maxwait parameter
Rename yum_cron class to yum_update & refactor to move OS specific stuff into hiera
Fix random_delay if 0 or <=5
Add specific update_months to motd notice
Refactor *_upgrade::update_months parameter to simplify logic

This is being tested in asd-pup-control repo with the following hosts:

billglick commented 3 years ago

Only thing I did not address from @andylytical 's recommendations:

kernel_upgrade.sh line 96: the option --disableexcludes=all could be problematic if certain repos are supposed to be excluded (such as slurm, kubernetes, docker, etc.).

I think this is safe here because the updated packages are being limited to only those that start with kernel. It is fairly common to exclude kernel packages in a yum config file (which this module is doing by default), so we need a way to allow this, which is why this script has to disable excludes when it upgrades the kernel package.

andylytical commented 3 years ago

Only thing I did not address from @andylytical 's recommendations:

kernel_upgrade.sh line 96: the option --disableexcludes=all could be problematic if certain repos are supposed to be excluded (such as slurm, kubernetes, docker, etc.).

I think this is safe here because the updated packages are being limited to only those that start with kernel. It is fairly common to exclude kernel packages in a yum config file (which this module is doing by default), so we need a way to allow this, which is why this script has to disable excludes when it upgrades the kernel package.

Sounds good to me.