fix #973: fix order chaining in agent.pp#976
fix #973: fix order chaining in agent.pp#976Flo2388 wants to merge 1 commit intotheforeman:masterfrom
Conversation
This adjustment is necessary to avoid a race condition which ends up in a dead service due to too early restart when upgrading or downgrading the agent.
| Class['puppet::agent::install'] ~> Class['puppet::agent::config'] ~> Class['puppet::agent::service'] | ||
| Class['puppet::config', 'puppet::agent::config'] ~> Class['puppet::agent::service'] |
There was a problem hiding this comment.
There already is a Class['puppet::agent::config'] ~> Class['puppet::agent::service'] on the next line, so this seems unnecessary?
There was a problem hiding this comment.
(not saying there is no bug somewhere, just that this change should be a noop)
There was a problem hiding this comment.
This change means that an update to the agent package no longer restarts the agent service because there's no transitive property between chaining. If Class['puppet::agent::config'] is notified, it only notifies the contained resources. It will only notify others if one of those contained resources makes a change.
Concrete: if you change the package version, but not the config then there won't be a service restart.
Now your package manager may restart the service already. I can imagine there's some race condition between those 2.
This adjustment is necessary to avoid a race condition which ends up in a dead service due to too early restart when upgrading or downgrading the agent.