Automatic Rollback Deployment Job Pending

Document ID : KB000103161
Last Modified Date : 22/06/2018
Show Technical Document Details
Issue:
The deployment plan is configured to use automatic rollback but the rollback deployment is awaiting user/manual intervention to start the rollback job - in either "Initialization Pending" or "Validation Pending" status. 
Environment:
CA Release Automation 6.5 and above. 
Cause:
The reason why it is showing "Initialization Pending" or "Validation Pending" status is because the "Environment" has not been explicitly set to allow Automatic rollbacks. 

The reason why it may show "Initialization Pending" sometimes or "Validation Pending" other times is based on whether or not a Pre-Deploy step has been added to the deployment plan that the rollback is based off of. If a Pre-Deploy step is present then it will show "Initialization Pending" until the Environment is configured to allow Automatic Rollbacks. Either that or the rollback settings in the deployment plan are set to "Manual" invocation. 
Resolution:
Go to the Environments -> Rollback view. From there select the application and specific environment you want the automatic rollback to start for – without any kind of user/manual intervention. Then click the edit link to the right of “Environment Level Settings” and select the radio button for “Allow manual and automatic invocation”
Additional Information:
Full overview of getting the rollbacks to work automatically:
 
  1. Each step in a deployment template/plan has a property available to be set in which IF that step fails it can trigger a rollback or not. The default (in 6.5 – assuming above too) is for that step to trigger a rollback if it fails. 
  2. Manual or Automatic rollbacks can be configured in a deployment plan. There is a rollback tab in deployment plans to configure this. When you setup a rollback it works based on (all of which must be set):
    1. Projects
    2. Template Categories
    3. Deployment Templates
    4. Deployment Plans 
  3. When you run a deployment, as long as one of the steps in that deployment fails and is set to trigger a rollback (see #1) it will create a new deployment based on the rollback settings defined in #2 (project, template category, etc..). By default it will set this deployment to either:
    1. From the new deployments job view: “Initialization Pending” (if there is a pre-deploy step) or “Validation Pending” (if there is no pre-deploy step); or
    2. From the failed jobs view: “Rollback Initialization Pending” (if there is a pre-deploy step) or “Rollback Validation Pending” (if there is no pre-deploy step);
  4. To make that newly created deployment, created for the rollback, start automatically (vs sitting in Initialization/Validation Pending) you need to:
    1. Make sure that the deployment plan’s rollback is set to automatic.
    2. Go to the Environments -> Rollback view. From there select the application and specific environment you want the automatic rollback to start for – without any kind of user/manual intervention. Then click the edit link to the right of “Environment Level Settings” and select the radio button for “Allow manual and automatic invocation”.
    3. Run your deployment again. This time if a step, set to trigger a rollback, fails then it will crete the deployment job and start the deployment automatically.