voxpupuli / puppet-augeasproviders_grub

Augeas-based grub type and providers
Apache License 2.0
9 stars 33 forks source link

How does one handle kernel parameter changes that call for grub2-mkconfig and reboot ? #39

Closed linuxdan closed 2 years ago

linuxdan commented 6 years ago

Example: (RHEL 7)

kernel_parameter{'ipv6.disable': ensure => absent, }

trevor-vaughan commented 6 years ago

I do it this way https://github.com/simp/pupmod-simp-fips/blob/master/manifests/init.pp#L54

Using https://github.com/simp/pupmod-simp-simplib/blob/master/lib/puppet/type/reboot_notify.rb

raphink commented 6 years ago

@trevor-vaughan does this use /var/lib/reboot-required on OSes that support it?

trevor-vaughan commented 6 years ago

@raphink Honestly, I didn't even know that was a thing! But now that I do, it probably should. In this case, I wanted to be able to give useful metadata to the user about why the reboot was required and be able to have multiple reasons based on different parts of code.

trevor-vaughan commented 6 years ago

@raphink Do you know of a way of definitively detecting if an OS supports that file? It seems like it's a Debian-ish thing. I could always just drop the file in place no matter what but that seems...weird.

linuxdan commented 6 years ago

@trevor-vaughan Does your code actually cause a reboot or just create a notification?

linuxdan commented 6 years ago

@raphink /var/lib/reboot-required looks like a Debian thing. Even so, I can find no guidance about using it. Most of the Red Hat/CentOS search results refer to yum’s needs-restarting, but this operation does not use yum.

jhoblitt commented 2 years ago

What I do is notify https://forge.puppet.com/modules/puppetlabs/reboot. Works great.