Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service started before config applied #32

Closed
StuartMcManus opened this issue Jul 13, 2020 · 4 comments · Fixed by #34
Closed

Service started before config applied #32

StuartMcManus opened this issue Jul 13, 2020 · 4 comments · Fixed by #34

Comments

@StuartMcManus
Copy link

Description of problem

  • What did you do? Within a base image we have the sensu-client installed with config but without a windows service created
  • What happened? When puppet runs on a host built off of that base image the sensuclassic module uses the DSC resource to create the service and start it during the the puppet run before the config gets put down within that same puppet run.
  • What did you expect to happen? Config changes to happen before any service creations and starts
  • How can someone reproduce the problem? They can install Sensu, remove the service then run puppet

Command used and debugging output

  • What does your puppet config look like (including any hiera config)
  • Is this a masterless or master based puppet setup? Master based setup

Platform and version information

  • Your OS: Redhat 7.8 (Maipo)
  • Your Ruby version: ruby 2.0.0.648-36.el7.x86_64
  • Your version of Puppet: 5.5.20 open source
  • Your version of Sensu: 1.8.0.1 (Windows client)
  • Your version of this module: 3.4.1

Anything else to add that you think will be helpful?

@treydock
Copy link
Collaborator

@StuartMcManus Can you provide logs of all changes made by Puppet on a failed Puppet run? You can limit them to just changes from sensuclassic module. The dsc_service['sensu-client'] resource is supposed to just install the service and the service['sensu-client'] resource is supposed to actually start the service. I am curious if in your case the dsc_service resource is actually starting the service.

@StuartMcManus
Copy link
Author

Hello @treydock sorry I should have provided this straight off but it is definitely dsc that is starting the service. I have attached a refined log of just sensuclassic changes and below is the DSC JSON that gets created for starting the service along with a Windows eventlog screenshot for the service starting.

DSC module version: 1.9.3

{"time": "2020-07-13T09:56:44.707+01:00", "type": "verbose", "message": "[IP-X-X-X-X]: LCM: [ Start Set ] [[Service]DirectResourceAccess] "},
{"time": "2020-07-13T09:56:48.468+01:00", "type": "verbose", "message": "[IP-X-X-X-X]: [[Service]DirectResourceAccess] Service 'sensu-client' started."},
{"time": "2020-07-13T09:56:48.469+01:00", "type": "verbose", "message": "[IP-X-X-X-X]: LCM: [ End Set ] [[Service]DirectResourceAccess] in 3.7610 seconds."},
{"time": "2020-07-13T09:56:48.469+01:00", "type": "verbose", "message": "[IP-X-X-X-X]: LCM: [ End Set ] in 3.7920 seconds."}

Cheers,
Stuart
Puppet_Service_Run.txt
sensu_service

treydock added a commit that referenced this issue Jul 14, 2020
@treydock
Copy link
Collaborator

@StuartMcManus Can you see if #34 solves this issue?

@StuartMcManus
Copy link
Author

Hello @treydock it looks like that does fix the issue so I have updated #34 with a comment and approved.

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 a pull request may close this issue.

2 participants