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

Windows client value set to false throws puppet run error #36

Closed
StuartMcManus opened this issue Aug 24, 2020 · 4 comments · Fixed by #37
Closed

Windows client value set to false throws puppet run error #36

StuartMcManus opened this issue Aug 24, 2020 · 4 comments · Fixed by #37

Comments

@StuartMcManus
Copy link

StuartMcManus commented Aug 24, 2020

Description of problem

  • What did you do? We installed Sensu-Client successfully using puppet and then we set the client var to false to disable the service.
  • What happened? Puppet threw and error about Exec[install-sensu-client-service].
  • What did you expect to happen? The service to be stopped and disabled.
  • How can someone reproduce the problem? Install Sensu-Client using puppet then set the value for client to false i.e. sensu::client: false or sensuclassic::client: false to set the service into a stopped and disabled state.

Command used and debugging output

  • What does your puppet config look like (including any hiera config) - I have attached example class we are using to install the Sensu-Client which also shows hiera to set the client value.

I have tested a possible fix which runs puppet successfully see diff attached as it doesn't display correctly for client.pp:

  • Is this a masterless or master based puppet setup? Master based

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.6.2

Anything else to add that you think will be helpful?

DSC module version: 1.9.3

Error that is seen when running puppet:

Info: Using configured environment test Info: Retrieving pluginfacts Info: Retrieving plugin Info: Retrieving locales Info: Loading facts Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not find resource 'Exec[install-sensu-client-service]' in parameter 'before' (file: /modules/external/sensuclassic/manifests/client.pp, line: 55) on node test.domain.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

@StuartMcManus
Copy link
Author

Attachments to look through:
Sensu_Class.txt
Diff_Of_Client.txt

@treydock
Copy link
Collaborator

@StuartMcManus Try #37. Your diff would not work because if windows_service_user is not defined the two resources throwing errors would not be defined thus would be similar error to what you saw.

@StuartMcManus
Copy link
Author

@treydock yes sorry I thought for a second that else statement was within the if $sensuclassic::windows_service_user statement block but obviously it can not without another if statement within. I will try out your change tomorrow cheers.

@StuartMcManus
Copy link
Author

@treydock I have been able to carry out testing with the changes with no issues being seen. The testing was with our current setup which means we were supplying credentials for the service so no testing has been done not supplying credentials as we don't do that but that part hasn't really changed so should be fine I guess.

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