Bug #793
changing runinterval in puppet.conf does not take effect on re-parse of puppet.conf file
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | 0.24.0 | |||
| Affected Puppet version: | 0.25.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
I’m pretty sure this is a bug, although I’m unclear how easy it will be to fix. If you modify runinterval in the puppet.conf file, it appears not to take effect without a puppetd restart. This is non-optimal if you are using puppet to configure puppet and want to change the runinterval. Restarting puppetd with itself doesn’t work correctly for obvious reasons.
log snippet:
Aug 26 16:46:40 domU-12-31-33-00-03-B2 puppetdr2225: Reparsing /etc/puppet/puppet.conf Aug 26 16:46:42 domU-12-31-33-00-03-B2 puppetdr2225: Finished configuration run in 21.99 seconds Aug 26 16:48:45 domU-12-31-33-00-03-B2 puppetdr2225: Starting configuration run Aug 26 16:48:47 domU-12-31-33-00-03-B2 puppetdr2225: Finished configuration run in 2.87 seconds Aug 26 16:49:10 domU-12-31-33-00-03-B2 puppetdr2225: Reparsing /etc/puppet/puppet.conf Aug 26 16:50:51 domU-12-31-33-00-03-B2 puppetdr2225: Starting configuration run Aug 26 16:50:54 domU-12-31-33-00-03-B2 puppetdr2225: Finished configuration run in 2.68 seconds Aug 26 16:52:56 domU-12-31-33-00-03-B2 puppetdr2225: Starting configuration run Aug 26 16:52:59 domU-12-31-33-00-03-B2 puppetdr2225: Finished configuration run in 2.88 seconds Aug 26 16:53:37 domU-12-31-33-00-03-B2 puppetdr2225: Caught TERM; shutting down Aug 26 16:53:37 domU-12-31-33-00-03-B2 puppetdr2225: Shutting down Aug 26 16:53:41 domU-12-31-33-00-03-B2 puppetdr13102: Reopening log files Aug 26 16:53:41 domU-12-31-33-00-03-B2 puppetdr13102: Starting Puppet client version 0.23.2 Aug 26 16:53:45 domU-12-31-33-00-03-B2 puppetdr13102: Starting configuration run Aug 26 16:54:03 domU-12-31-33-00-03-B2 puppetdr13102: Finished configuration run in 17.84 seconds Aug 26 16:54:12 domU-12-31-33-00-03-B2 puppetdr13102: Starting configuration run Aug 26 16:54:16 domU-12-31-33-00-03-B2 puppetdr13102: Finished configuration run in 3.20 seconds Aug 26 16:54:47 domU-12-31-33-00-03-B2 puppetdr13102: Starting configuration run Aug 26 16:54:50 domU-12-31-33-00-03-B2 puppetdr13102: Finished configuration run in 2.72 seconds
You can see the interval doesn’t change until after a puppetd restart.
History
Updated by Anonymous over 4 years ago
- Status changed from 1 to 2
Updated by Luke Kanies over 4 years ago
Are you sure restarting puppetd doesn’t work? It should correctly catch the signal and then restart when the configuration run is done.
Updated by Randy Bias over 4 years ago
I am not certain. I will test.
Updated by Zach Wily over 4 years ago
I can’t get puppetd to restart itself either. Here’s my config:
service { "puppet":
name => "puppet",
ensure => running
}
class puppet_node {
remotefile { "/etc/puppet/puppetd.conf":
mode => 644,
source => "os/etc/puppet/puppetd.conf",
notify => Service[puppet]
}
}
I get this error when it updates puppetd.conf and tries to restart puppet:
Sep 15 16:55:20 ca1-web3 puppetdr7166: Could not create PID file: /var/run/puppet/puppetd.pid
If I manually set restart on the puppet service to “/etc/init.d/puppet reload”, I don’t get any errors in the log but it doesn’t actually restart puppetd either.
(BTW, I want to restart puppetd because I want to add the listen option, and reparsing the config file doesn’t seem to pick up that change, just like it doesn’t pick up runinterval.)
Updated by Anonymous over 4 years ago
- Status changed from 2 to Closed
- 7 set to wontfix
This ticket will not be fixed. The runinterval is a once only config variable, meaning that puppetd needs to be restarted in order for it to take effect. If you want the runinterval to take effect automatically, you must manage the puppet service with puppet itself. In zwily’s example, he has the right idea. He has puppet notify the puppet service when the puppet.conf changes.
I tested this by running a puppetmaster and puppetclient. If the /etc/puppet/puppet.conf source file (i.e. /some/where/else/puppet.conf) changed, puppet updated the /etc/puppet/puppet.conf. Then, I sent the puppetd process a SIGHUP. After puppetd restarted, the new runinterval took effect.
The problem in zwily’s comment may be the fault of the /etc/init.d/puppet script not properly restarting the puppetd service by sending it a HUP signal or some other problem. This is my speculation.