Skip to content

Conversation

@Flo2388
Copy link

@Flo2388 Flo2388 commented Jan 21, 2026

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.

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.
Comment on lines +8 to 9
Class['puppet::agent::install'] ~> Class['puppet::agent::config'] ~> Class['puppet::agent::service']
Class['puppet::config', 'puppet::agent::config'] ~> Class['puppet::agent::service']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There already is a Class['puppet::agent::config'] ~> Class['puppet::agent::service'] on the next line, so this seems unnecessary?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(not saying there is no bug somewhere, just that this change should be a noop)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants