Hi, I am just starting to try to learn/use puppet. The problem I am trying to overcome now it how to make a client reboot after a kernel upgrade. Alternatively, what is the best practice for managing kernels on a debian system. Thanks -- James Richardson Debian GNU/Linux Consultant http://www.linkedin.com/in/jamesrichardsonconsulting
Hey there, I think you would just run "/sbin/reboot" exec { "reboot machine after kernel upgrade": command => "/sbin/reboot", subscribe => Exec["upgrade kernel"], refreshonly => true } Tim On Tue, Apr 14, 2009 at 9:23 PM, James Richardson <james@jamesr.biz> wrote:> Hi, > > I am just starting to try to learn/use puppet. The problem I am trying > to overcome now it how to make a client reboot after a kernel upgrade. > > Alternatively, what is the best practice for managing kernels on a > debian system. > > Thanks > -- > James Richardson > Debian GNU/Linux Consultant > http://www.linkedin.com/in/jamesrichardsonconsulting > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAknlUzEACgkQklHVouX74MUBhwCdGjC95MG9iKK6yyBwE5vZMJaq > kmQAnRZkHf6OLxKyZZFLtGRzTMUmzThc > =STVe > -----END PGP SIGNATURE----- > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
James Richardson wrote:> Hi, > > I am just starting to try to learn/use puppet. The problem I am trying > to overcome now it how to make a client reboot after a kernel upgrade. > > Alternatively, what is the best practice for managing kernels on a > debian system. > > Thanks >I manage upgrades through scripts, but you can have an exec like this: exec { "/sbin/reboot": refreshonly => "true" } Then in your kernel package def set the attribute notify => Exec["/sbin/reboot"]. This means when your kernel package gets changed, the system reboots. It will be unpredictable however, unless your nodes are in LDAP and you can run puppetrun on all of them at once... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Apr 15, 2009 at 8:29 AM, Joe McDonagh <joseph.e.mcdonagh@gmail.com> wrote:> > James Richardson wrote: >> Hi, >> >> I am just starting to try to learn/use puppet. The problem I am trying >> to overcome now it how to make a client reboot after a kernel upgrade. >> >> Alternatively, what is the best practice for managing kernels on a >> debian system. >> >> Thanks >> > > I manage upgrades through scripts, but you can have an exec like this: > > exec { "/sbin/reboot": > refreshonly => "true" > } > > Then in your kernel package def set the attribute notify => > Exec["/sbin/reboot"]. This means when your kernel package gets changed, > the system reboots. It will be unpredictable however, unless your nodes > are in LDAP and you can run puppetrun on all of them at once... >This brings you to the really question. Do you really want the servers rebooting in a semi random manner? Some as disruptive as a system reboot really need to be set to happen at pre-scheduled time, not really whenever there is a kernel update. I would suggest using a ''notify =>'' to a cron type that sets up a pre-scheduled reboot window. Evan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On 4/14/2009 10:23 PM, James Richardson wrote:> Alternatively, what is the best practice for managing kernels on a > debian system.I won''t call it a best practice, but I put all my kernels on hold and upgrade them manually when needed. exec { "hold-kernels": command => "for name in `dpkg --get-selections | grep linux-image | grep -v hold | awk ''{print \$1}''`; do echo \$name hold | dpkg --set-selections; done", onlyif => "/usr/bin/dpkg --get-selections | /bin/grep linux-image | /bin/grep -q install" } -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---