windowsrefund
2008-Apr-24 21:50 UTC
[Puppet Users] Trying to stop/start services in a specific order
Hi everyone, I''ve got a silly application that has some crazy requirements in terms of its startup/shutdown sequence and I''m trying to get it worked out with puppet. Basically, I need to do the following things any time a newer package is installed (via yum provider): 1. stop app1 2. stop app2 3. init app1 4. start app1 5. start app2 The example below shows my failure to comprehend how this is possible: class myclass { package { app1: ensure => latest, notify => [ Service[app1], Service[app2] ] } package { ''app2'': ensure => latest, } service { app1: ensure => running, hasstatus => false, start => ''/etc/init.d/app1 init; /etc/init.d/app1 start'', require => Package[app1], } service { app2: ensure => running, require => Service[app1] , } } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2008-Apr-24 23:06 UTC
[Puppet Users] Re: Trying to stop/start services in a specific order
On Apr 24, 2008, at 4:50 PM, windowsrefund wrote:> Hi everyone, > > I''ve got a silly application that has some crazy requirements in terms > of its startup/shutdown sequence and I''m trying to get it worked out > with puppet. Basically, I need to do the following things any time a > newer package is installed (via yum provider): > > 1. stop app1 > 2. stop app2 > 3. init app1 > 4. start app1 > 5. start app2 > > The example below shows my failure to comprehend how this is possible:This is unfortunately basically impossible at the moment. I''m actually not even sure what it would take to make it work, but I''d love to see a way to support it. -- It is absurd to divide people into good and bad. People are either charming or tedious. -- Oscar Wilde --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
windowsrefund
2008-Apr-25 00:38 UTC
[Puppet Users] Re: Trying to stop/start services in a specific order
I settled on handling things at the init script level and using a refreshonly inside of an exec in order to get the desired effect. Thanks, Adam> This is unfortunately basically impossible at the moment. I''m > actually not even sure what it would take to make it work, but I''d > love to see a way to support it. > > -- > It is absurd to divide people into good and bad. People are either > charming or tedious. -- Oscar Wilde > --------------------------------------------------------------------- > Luke Kanies |http://reductivelabs.com|http://madstop.com--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---