I’m testing Octopus with DSC and am using the example at https://octopus.com/blog/octopus-and-powershell-dsc
I have 2 problems when trying the example:
- When modifying the configuration to simulate a drift, the health check is giving me some errors: it doesn’t seem to be able to use
Fail-HealthCheck : The term ‘Fail-HealthCheck’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Octopus\Work\20170504100258-11\Script.ps1:5 char:6
- once my machine becomes unhealthy, the trigger to correct the drift that I’ve created never seems to start.
My trigger config is:
Events: Machine found to be unhealthy
Environments: Production EU
Any idea what the problem could be?
Thanks a lot.
Thanks for getting in touch.
What version of Octopus are you running the DSC example on?
Can you send the raw task log from your health check where “Fail-HealthCheck” is not working? (https://octopus.com/docs/how-to/get-the-raw-output-from-a-task)
Can you send the raw auto deploy diagnostic log, available from Configuration > Diagnostics > Auto deploy logs.
The version of Octopus I’m using is 3.12.5.
Please find attached the log file that you’ve requested.
There is nothing in the auto deploy diagnostic log.
Am I missing anything?
I’ve created a trigger that looks like this:
DeploymentRawLog.log.txt (16 KB)
The trigger looks good to me.
Could I get the health check log where “Fail-HealthCheck” is not working please?
I’ve attached the health check log.
HealthTestLog.txt (3 KB)
Just one other thing that I’m not 100% clear about. Would using DSC directly in Octopus always be in Push mode then?
It looks like your health check has worked? Has the trigger kicked off as well?
Using DSC in Octopus following the example blog is in Push mode. Octopus is used to detect and correct drift. You could set up a Pull server and have Octopus configure each client. The state would be managed by the Pull server instead of Octopus.
Thanks for answering my question regarding the push mode, that’s what I thought it would be but wanted to be sure about that.
The trigger doesn’t seem to start when he sees that the health of the server is unhealthy, this is what I don’t really understand.
Would you be available to do a support call? I think it’s going to be difficult to diagnose going back and forth via the forum. You can scheduled a call here: https://calendly.com/octopusdeploy/supportcall
Please link to this support ticket when scheduling the call.