Trigger not starting and error with Fail-HealthCheck

Hi,
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:

  1. 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
  •  Fail-HealthCheck "Machine drift test"
    
  1. 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
    Roles: TestRole

Redeploy: ON

Any idea what the problem could be?
Thanks a lot.
Regards,
Michel

Hi Michel,

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.

Thanks,
Shane

Hi Shane,

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:

[cid:image003.png@01D2C58A.8F9FF7F0]

Best regards,
Michel

DeploymentRawLog.log.txt (16 KB)

image001.gif

image002.jpg

Hi Michel,

The trigger looks good to me.
Could I get the health check log where “Fail-HealthCheck” is not working please?

Thanks
Shane

Hi Shane,

I’ve attached the health check log.

Best regards,
Michel

HealthTestLog.txt (3 KB)

image001.gif

image002.jpg

Hi Shane,

Just one other thing that I’m not 100% clear about. Would using DSC directly in Octopus always be in Push mode then?

Best regards,
Michel

image001.gif

image002.jpg

Hi Michel,

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.

Cheers,
Shane

Hi Shane,
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.

Best regards,
Michel

image001.gif

image002.jpg

Hi Michel,

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.

Please link to this support ticket when scheduling the call.

Cheers,
Shane