Problem
Unable to change the Action Mode of a Policy from Preview to Production mode.
Error Message
The error message below is shown in the Admin Portal when switching the Action Mode of a policy from Preview to Production. Cannot update policy at this time. Contact customer support team to get more information.
Additional error details can be found in a Browser Network Trace (HAR file). By selecting F12 while in the web browser and then generating the error again, the error on the UpdatePolicy API call will be shown.
POST https://[company-name]-[azure-region]-onhubstor.azurewebsites.net/api/policy/updatepolicy:Error executing updatePolicyInternal. The policy is currently undergoing a full evaluation. This can happen due to various reasons such as recent modifications in policy settings or schedules, or periodically triggered full evaluations. The Action mode cannot be changed while full evaluation is in process. Please try after some time.
Cause
This error will be generated when the policy matches all the following criteria:
Policy is enabled.
Action Mode (Preview/Production) has been changed.
A full policy evaluation has been set.
When a policy is run in Preview mode, it will do two full evaluation runs. The first run gathers all results that match the policy criteria. The second run gathers the results needed for the analytics page.
If an attempt to edit the policy to Production mode before those two evaluation runs complete then the error will be generated and editing of the policy will not be allowed.
Details of each Action Mode (Preview/Production) are below:
Preview - This mode executes the policy without applying any actions. It provides details of items that meet the policy's selection criteria and provides a view of the data via the Analytics page.
(NOTE: It's recommended to always run policies in Preview mode first before running it in Production mode, so the data can be reviewed before any action is taken.)
Production - This mode executes the policy along with any actions. Whatever content meets the policy's selection criteria will have the policy's action applied.
Solution
To workaround the error and bypass the Preview policy evaluation runs in order to move it directly to Production mode, do the following:
- Disable the policy.
- Update the Action Mode (e.g., from Preview to Production)
- Enable the policy again.
If the above steps do not work please contact Cohesity Support to assist further.