Bug #1353
Red Hat service provider should be enhanced to support both reload and restart
| Status: | Duplicate | Start date: | 06/10/2008 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | service | |||
| Target version: | - | |||
| Affected Puppet version: | 0.22.1 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
Sometimes, I want to use specific restart commands for a service, but I have found out that Puppetd ignores them completely. I took a look at the code, and it seems like the restart property is only checked in the base service provider. The restart method is overridden in the init provider, and again overridden in the red hat provider, and none of those care the least about the restart property.
I would like to be able to specify restart commands without having to switch to the base provider for my services. I think that a specified command should always take precedence over the defaults.
Added (jamtur01): Red Hat provider should support both restart and reload options.
Related issues
History
Updated by AJ Christensen almost 4 years ago
- Status changed from Unreviewed to Rejected
The redhat service provider is designed to managed redhat-based LSB compliant init scripts, as such, specifying restart commands are unecessary – the restart command IS restart, as per the documentation (http://www.linuxfoundation.org/spec/refspecs/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html)
If you need to explicitly specify the restart command make use of the base provider as you’ve already mentioned.
Updated by Ingemar Nilsson almost 4 years ago
This seems like an incredibly arrogant position. What if I don’t want it to restart, and rather reload instead? That’s what I hoped to use it for. But I guess that it’s your way or the highway.
I have several services that I would prefer to reload the configuration on after a change rather than having the service restart, which for a short moment stops the service, interrupting the service that it provides.
But I guess that I’ll have to patch Puppet and maintain the patch myself.
Updated by Peter Meier almost 4 years ago
In my opinion init’s argumentation makes sense. For example, maybe you rather like to gracefully restart apache. On the other hand I think the current solution is correct, as restart means in my opinion restart and not reload. So I would appreciate a patch which will enable the provider for more felixibility and if the redhat-service-provider would respect the reload parameter it wouldn’t change the current behaviour, it would simply extend it and make it working according to the documentation. Otherwise this should be mentioned in the documentation.
So I vote for reopening.
Updated by Ingemar Nilsson almost 4 years ago
In my opinion init’s argumentation makes sense.
Thanks.
For example, maybe you rather like to gracefully restart apache.
Exactly.
On the other hand I think the current solution is correct, as restart means in my opinion restart and not reload. So I would appreciate a patch which will enable the provider for more felixibility and if the redhat-service-provider would respect the reload parameter it wouldn’t change the current behaviour, it would simply extend it and make it working according to the documentation.
With this solution, there would need to be some mechanism to make sure that sending events to a service would trigger a reload instead of a restart. With my proposed fix, restart would actually always be a reload, which of course would be a problem if you sometimes would want a restart and sometimes would want a reload.
And then, reload isn’t always reload. The Apache init.d script has both reload and graceful. How would one differ between those?
Updated by James Turnbull almost 4 years ago
- Status changed from Rejected to Accepted
Happy to re-open – especially if you wish to submit a patch.
Whilst fujin was somewhat blunt I would suggest a lot of people make use of the current behaviour and any change to it would be problematic. In my opinion – any patch would need to cater for both restart and reload capability. Please also include tests if possible for any patch.
Thanks
Updated by James Turnbull almost 4 years ago
- Target version changed from 0.24.4 to 4
Updated by AJ Christensen almost 4 years ago
Might I suggest updating the ticket name and description as it is currently inaccurate. My apologies for rejecting this one, I must have been on a rampage (I only meant to provide relevant information :>)
Updated by James Turnbull almost 4 years ago
- Subject changed from Puppetd ignores service restart command for (at least) the redhat service provider to Red Hat service provider should be enhanced to support both reload and restart
Updated by anarcat - about 3 years ago
- Affected Puppet version set to 0.22.1
Note that this is related to issue #1014.
Updated by Nigel Kersten over 1 year ago
- Status changed from Accepted to Duplicate
Updated by James Turnbull about 1 year ago
- Target version deleted (
4)