byron appelt
2010-Nov-16 23:09 UTC
[Puppet Users] Stopping a service before a package upgrade
Is there a way to shutdown a running service before a package is upgraded? This seems like a pretty basic thing to do, but I can''t figure it out. -- 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.
Daniel Pittman
2010-Nov-16 23:35 UTC
Re: [Puppet Users] Stopping a service before a package upgrade
byron appelt <byron.appelt@gmail.com> writes:> Is there a way to shutdown a running service before a package is upgraded? > This seems like a pretty basic thing to do, but I can''t figure it out.Nope. On most platforms this is handled by the package itself, rather than by an external tool, since it would otherwise fail when a regular administrator tried to perform the update. Regards, Daniel -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- 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.
byron appelt
2010-Nov-17 17:20 UTC
[Puppet Users] Re: Stopping a service before a package upgrade
The package I am trying to update is running under monit, which will start it back up if not shut down via monit, which the package itself cannot do. Is there a recommended way to handle this sort of situation? -Byron On Nov 16, 5:35 pm, Daniel Pittman <dan...@rimspace.net> wrote:> byron appelt <byron.app...@gmail.com> writes: > > Is there a way to shutdown a running service before a package is upgraded? > > This seems like a pretty basic thing to do, but I can''t figure it out. > > Nope. On most platforms this is handled by the package itself, rather than by > an external tool, since it would otherwise fail when a regular administrator > tried to perform the update. > > Regards, > Daniel > -- > ✣ Daniel Pittman ✉ dan...@rimspace.net ☎ +61 401 155 707 > ♽ made with 100 percent post-consumer electrons-- 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.
Mohit Chawla
2010-Nov-17 17:48 UTC
Re: [Puppet Users] Re: Stopping a service before a package upgrade
Hi, On Wed, Nov 17, 2010 at 10:50 PM, byron appelt <byron.appelt@gmail.com>wrote:> The package I am trying to update is running under monit, which will > start it back up if not shut down via monit, which the package itself > cannot do. Is there a recommended way to handle this sort of > situation? >A puppet provider for it would be the ideal way. For eg., I use runit. Other way might be to write a bunch of execs and defines for the job. And/or open a feature request. :) -- 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.
Daniel Pittman
2010-Nov-17 22:39 UTC
Re: [Puppet Users] Re: Stopping a service before a package upgrade
Mohit Chawla <mohit.chawla.binary@gmail.com> writes:> On Wed, Nov 17, 2010 at 10:50 PM, byron appelt <byron.appelt@gmail.com> wrote: > >> The package I am trying to update is running under monit, which will start >> it back up if not shut down via monit, which the package itself cannot >> do. Is there a recommended way to handle this sort of situation?Shed bitter tears? I don''t actually know of any particularly good way to handle that situation, either inside puppet or outside it, because most systems don''t do a good job of supporting non-standard service monitoring. In similar situations I have usually done one of two things: One, ensured that the package update doesn''t try and manage service operation at all, pretty much. Which works OK for the stuff we handle with heartbeat. (On Debian that wasn''t too bad, because it has good policy support for this stuff and the packages all comply to that. This may not help you, however.) Two, use something like the Perl Server::Starter tools which will happily keep the application running under monit correctly despite the package update, and then post-process the graceful restart. So, um, the best I can offer is that you don''t try and shut down the service before or during the upgrade. Perhaps we can help achieve that and, even if it isn''t ideal, help solve your practical problem?> A puppet provider for it would be the ideal way. For eg., I use runit.That wouldn''t actually help: the package provider and the service provider would need to collude, and Puppet doesn''t really support that.> Other way might be to write a bunch of execs and defines for the > job. And/or open a feature request. :)Either of those might work - perhaps someone else at Puppet Labs has a better idea about how this can be managed. Daniel -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- 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.
Mohit Chawla
2010-Nov-18 15:24 UTC
Re: [Puppet Users] Re: Stopping a service before a package upgrade
Hi, On Thu, Nov 18, 2010 at 4:09 AM, Daniel Pittman <daniel@rimspace.net> wrote:> That wouldn''t actually help: the package provider and the service provider > would need to collude, and Puppet doesn''t really support that. >I forgot runit made things simpler, by having runit-policy.d which would prevent a service to start when a package is installed. Maybe something similar for monit ? A monit provider would still be required/nice-to-have to facilitate the procedure. -- 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.