Issue #23320 has been updated by James Ralston.
Git pull request sent. ---------------------------------------- Bug #23320: NetworkManager dispatcher script needs to reload Puppet agent, not restart https://projects.puppetlabs.com/issues/23320#change-100280 * Author: James Ralston * Status: Unreviewed * Priority: Normal * Assignee: * Category: * Target version: * Affected Puppet version: * Keywords: * Branch: ---------------------------------------- NetworkManager has a hardcoded 3-second timeout that it applies to each dispatcher script it runs. If a dispatcher script takes longer than 3 seconds to execute, NetworkManager forcibly kills the script. The Puppet distribution includes a NetworkManager dispatcher script that restarts the Puppet agent upon interface changes. This allows the Puppet agent to take immediate action if network-related information has changed. However, the fact that Puppet's dispatcher script calls the "restart" action instead of the "reload" action for the Puppet agent is problematic, because on slow systems (e.g., a laptop), the restart action can take longer than 3 seconds. (This is true regardless of whether the restart occurs via an init.d script or via systemd, as the majority of the time spent in restarting is spent in waiting for the Puppet agent to perform the work it needs to do before forking into the background.) For example, on my laptop, restarting the Puppet agent service always takes more than 3 seconds: $ time systemctl restart puppet.service real 0m4.572s user 0m0.006s sys 0m0.040s Instead of calling the "restart" action, the Puppet dispatcher script should call the "reload" action instead. This will send a SIGHUP to the running Puppet agent and immediately return. (The running Puppet agent will restart upon receiving the SIGHUP, but this restart occurs asynchronously to the execution of the dispatcher script.) This prevents the Puppet dispatcher script from exceeding NetworkManager's hardcoded 3-second timeout. For example, on the same laptop where the "restart" action took ~4.5 seconds, the "reload" action takes only a fraction of a second: $ time systemctl reload puppet.service real 0m0.094s user 0m0.004s sys 0m0.033s -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.