DSC deploying continuously in every 30mins in PUSH mode

Today we observed a weird issue while deploying a DSC configuration, below are the details

Problem description:
Triggered a DSC deployment on our environment which failed because of incorrect configuration. After couple of hours we observed that for every 30mins LCM was trying to deploy the old(failed) configuration resulting in multiple failure events being logged in event viewer and this took the server down to an inconsistent state.

LCM is configured in Push mode, which ideally means deployment of a configuration happens only when a DSC configuration is deployed by someone explicitly. But in the above scenario the deployment is getting triggered automatically. Tried changing the configuration mode from ApplyAndMonitor to ApplyOnly but we still see LCM trying to deploy the configuration.

We deployed on the same environment with a different configuration(correct one) and it deployed successfully. Now we see LCM still checking the state of my server but as there is no change since the last successful deployment it doesn’t perform any action.

Can someone please help us understand how we can stop LCM from doing regular checks, I just want my configuration to be applied when I explicitly deploy it.

The LCM has a setting called ConfigurationMode. To get the behavior you’re describing, you need to set that to “ApplyOnly”. If it’s set to ApplyAndAutoCorrect or ApplyAndMonitor, then it will continue to check the system for drift. (This is generally considered to be a good thing, but you’ve got the option of disabling that if you want.)

For reference: https://msdn.microsoft.com/en-us/powershell/dsc/metaconfig

Thanks for the info dave, we tried that. I tried that option and still i could see LCM applying the configuration for every refreshtime interval.
Sequence i tested it,

  1. Deployed the wrong configuration --> changed the configuration mode to ApplyOnly(Same behavior). Tried restarting the server, still LCM applies the configuration.
  2. Changed the configuration mode to ApplyOnly --> deployed the wrong configuration(still same thing happens).

ApplyOnly running consistency engine is weird. Which version of PowerShell are you using?
You can remove the failed configuration document from the node using:
Remove-DscConfigurationDocument -Stage Pending -Force -Verbose

After that LCM won’t log any event.