puppet-systemd icon indicating copy to clipboard operation
puppet-systemd copied to clipboard

The module should have the ability to reload services that have outdated unit dropin files

Open trevor-vaughan opened this issue 2 years ago • 2 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: All
  • Ruby: All
  • Distribution: Systemd-compatible
  • Module version: All

What are you seeing

After 2.9.0, it was possible to get your system into a state where a systemctl daemon-reload needed to be called in order to refresh items based on services.

A custom type should be created that, when enabled, will do the following:

  • Detect all unit files that need a daemon-reload to be called
  • Notify all affected services that exist in the catalog
  • (optionally) Create service resources that will be notified for restart

Any additional information you'd like to impart

The benefits of this approach are that it will persist a correct system, even with manual changes having been done.

The risks are that users that do not practice rigorous system control may be surprised when some services restart.

An alternate implementation would be to simply detect the services that require a reload. Unfortunately, to do this effectively, it would need to reside in a stage after all other resources.

Relates to #277

trevor-vaughan avatar Jun 17 '22 12:06 trevor-vaughan

Might be better as a feature request to the Service type.

repair => true

or something.

traylenator avatar Jul 03 '22 06:07 traylenator

@traylenator Huh...yeah, maybe. I'm honestly not sure. This really seems like a systemd thing so I figured it would go in the systemd module. It's a weird one.

trevor-vaughan avatar Aug 24 '22 21:08 trevor-vaughan

@trevor-vaughan is this issue also resolved by #277?

jhoblitt avatar Jan 27 '23 15:01 jhoblitt

I believe so, but can't dig in deep at the moment.

trevor-vaughan avatar Jan 27 '23 15:01 trevor-vaughan

Ok I'll close it -- we can always reopen it.

jhoblitt avatar Jan 27 '23 15:01 jhoblitt