We set up a DSC configuration project based on the following blog post: https://octopus.com/blog/octopus-and-powershell-dsc
After setting up the Trigger to automatically redeploy when a machine is reported as unhealthy, we can put the machine in an unhealthy state and the trigger starts the redeployment. However, after the redeployment finishes, it waits about 30 seconds or so then redeploys again. It continues this loop over and over again until we cancel it. I added a Health Check step to the end of the deployment process to see if that helped it recognize that the machine was healthy but even though the machine is listed as healthy the redeployments keep looping.
Thanks for getting in touch! I’m sorry you’re hitting this issue with your looping redeployments. We’ve been able to reproduce this behavior, and we’ve found that when a machine has an event that occurred since the start of the original successful deployment, it will redeploy every time the scheduler loops around (which is every 30 seconds).
We’ve started working on a fix, and we’ll resolve this as soon as we can. You can track the issue here: https://github.com/OctopusDeploy/Issues/issues/3304
For the time being, the workaround is to set the Redeploy in your trigger’s settings to false, and the loop will stop itself after the next time around.
I’m sorry again about this unexpected issue! Let us know if you have any further questions at all.