Approval policy created via API during deployment lifecycle using Event Broker Subscription (EBS) is sporadically not applied to the deployment
search cancel

Approval policy created via API during deployment lifecycle using Event Broker Subscription (EBS) is sporadically not applied to the deployment

book

Article ID: 438602

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite) VMware vSphere ESXi

Issue/Introduction

Environment Setup:

  • an Event Broker Subscription (EBS) is configured to create an approval policy, the Orchestrator workflow is configured to create the approval policy via API
    • the issue has been observed during deployment deletion but may also occur during different lifecycle phases
  • a second Event Broker Subscription is configured to fail if the deployment has not passed an approval policy

Symptoms:

The Deployment / Day2 action does sporadically fail for the second Event Broker Subscription as there was no approval policy applied.

Environment

Aria Automation 8.x

Cause

The deployment lifecycle passed on to the next stage before the approval policy had been applied to the deployment.

Resolution

Add a sleep interval to the workflow creating the approval policy, after the POST /policy/api/policies API call to ensure the policy has been applied to the deployment.

Additional Information

What is the recommended sleep time, and does increasing it prevent this issue from recurring?

Approval policies are cached per project. When you create a new policy, the cache requires a minimum time-to-live (TTL) of 2 minutes to invalidate and load the updated policy. If requests are submitted before this interval elapses, they do not match the new policy because the cache has not reloaded.

When creating a new approval policy, wait at least 2 minutes for the cache to invalidate and the policy to become active.