puppetlabs-puppet_agent icon indicating copy to clipboard operation
puppetlabs-puppet_agent copied to clipboard

rework how module manages the service

Open rstuart-indue opened this issue 5 years ago • 6 comments
trafficstars

The module manages the service for some OSs only (and when not PE). This change makes this more consistent to manage the service on all platforms, regardless of PE.

In particular, windows was a case where the module was excluded from managing the service. We want the puppet agent started again even when doing a manual run so that it is restored to service. But there is also the option added to disable this behavior.

rstuart-indue avatar Jan 16 '20 05:01 rstuart-indue

Waiting for CLA signature by @rstuart-indue

@rstuart-indue - We require a Contributor License Agreement (CLA) for people who contribute to Puppet, but we have an easy click-through license with instructions, which is available at https://cla.puppet.com/

Note: if your contribution is trivial and you think it may be exempt from the CLA, please post a short reply to this comment with details. http://docs.puppet.com/community/trivial_patch_exemption.html

puppetcla avatar Jan 16 '20 16:01 puppetcla

CLA signed by all contributors.

puppetcla avatar Jan 20 '20 00:01 puppetcla

The windows service is managed differently (and not with puppet) during the upgrade, because the services need to be shut off during upgrade and the upgrade cannot be performed by puppet itself. install_puppet.ps1 includes code that should restore service operation after the upgrade: https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/master/files/install_puppet.ps1#L358

mcdonaldseanp avatar Jan 21 '20 16:01 mcdonaldseanp

It sounds like you are describing the restart of the application so that it doesn't interfere with installation, but this is different to managing the service. It sounds like there might be two different purposes being talked about here:

  • starting the agent after installation or upgrade
  • ensuring the service is running all the time

It seems to me that the first is what you are describing as the intent of the code in this module, but the second is what is being done for a large number of systems. If managing the service is not wanted, then I would suggest removing the service resources completely and triggering starts of the agent with whatever tools are necessary but avoiding managing the service. Otherwise, there is going to be conflicts if people choose to manage the service and also use this module on non-PE systems and non-windows systems (eg RHEL).

rstuart-indue avatar Feb 03 '20 05:02 rstuart-indue

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 01 '21 18:09 CLAassistant

Another thing to mention here is that the module does not attempt to manage the service on PE at all, even though PE does not manage the puppet service. So, that probably needs to be changed too.

wilrodriguez avatar Jun 14 '22 21:06 wilrodriguez