sensu / puppet-module-sensuclassic

Puppet module to manage Sensu Classic (ruby version)
MIT License
0 stars 11 forks source link

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

Closed StuartMcManus closed 4 years ago

StuartMcManus commented 4 years ago

Description of problem

Command used and debugging output

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

Platform and version information

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 commented 4 years ago

Attachments to look through: Sensu_Class.txt Diff_Of_Client.txt

treydock commented 4 years ago

@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 commented 4 years ago

@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 commented 4 years ago

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