Deployment Executed Earlier Than Scheduled

Document ID : KB000120021
Last Modified Date : 07/11/2018
Show Technical Document Details
Issue:
A deployment job was submitted with the option: 
Create the deployment and: Execute pre-deployment step immediately. 

The deployment gets submitted and we scheduled it to be executed at a specific date and time. But the job was executed before its scheduled time. 
Environment:
CA Release Automation v6.6.0.9640
Cause:
The job was manually executed. 
Resolution:
Since the job was manually executed there is no resolution for this problem. However, if you need to understand who executed the deployment you can do this via the details of the deployment screen. Do do this navigate to the Releases -> Deployments page and click on the link for the deployment in question to view information regarding the deployment. On the right side it will show you details of the deployment. Included in those details are the "Deployment Started" property, "Deployment Schedule", Duration, Executer, and others. The Executer field will reflect the user who manually executed the deployment job. 
Additional Information:
This information is also available in the nolio_dm_all.log* files. This information can show the username who first submitted the job as well as the username who manually executed it. To retrieve this information you can use a comparable search string to: grep -Eh 'containerName=<the name of your deployment job>.*StageImpl.*ownerUsername' nolio_dm* | sort

The -E is instructing grep to perform an extended regular expression search. The -h is instructing grep to return the results without the filename where the match was found - this allows the "| sort" to return its results in chronological order. Here is an example set of messages:
  1. 2018-11-06 11:00:04,734 [eventsProcessingHandler[job:2]-1] DEBUG (com.nolio.releasecenter.services.release.execution.engine.StageExecutionEngineImpl:464) - Stage is done: com.nolio.releasecenter.services.release.execution.engine.data.UnmodifiableStageExecutionDataWrapper@5d755194[innerExecutionData=com.nolio.releasecenter.services.release.execution.engine.data.StageExecutionDataImpl@6c5c9b59[applicationId=4489000,containerName=DeployTest1,threadSafeStage=StageImpl{id=7928000, environmentId=5715000, agentGroupId=null, startTime=1541519993643, endTime=1541520004714, mode=FINISHED, ownerUsername='superuser', type=PREPARE, cachedEnvironmentName=null, stopUserName='null', runCondition=PREVIOUS_SUCCESS, mustSucceed=true, startAutomatically=true},buildOrVersion=,stageContainer=com.nolio.liquor.utils.StageContainer@4e74b7a[containerType=DEPLOYMENT,containerId=7927000],moduleExecutionsMap={7940000=com.nolio.releasecenter.services.release.execution.engine.data.ModuleExecutionDataImpl@73e94383},stageProgress=100.0,releaseState=FINISHED],innerStage=StageImpl{id=7928000, environmentId=5715000, agentGroupId=null, startTime=1541519993643, endTime=1541520004714, mode=FINISHED, ownerUsername='superuser', type=PREPARE, cachedEnvironmentName=null, stopUserName='null', runCondition=PREVIOUS_SUCCESS, mustSucceed=true, startAutomatically=true},unmodifiableModuleExecutionsMap={7940000=com.nolio.releasecenter.services.release.execution.engine.data.UnmodifiableModuleExecutionDataWrapper@7b6788f4}]
Highlights of message #1: 
  • The type=PREPARE is a reflection of the Pre Deployment step that runs (if there is one). This would be executed as soon as the job is submitted based on the option "Execute pre-deployment step immediately" being selected when submitting the deployment.
  • The username shown in these messages is the same username that submitted the job. Though it may not be the same user who scheduled the job. 
  • It's good to review the containerName value and make sure it reflects the name of the deployment you're interested in. 
  • The containerId (which is equal to the ReleaseID of the deployment) value can also be used to verify you are looking at the details of the correct deployment.
 
  1. 2018-11-06 11:00:05,170 [StageExecutorTask-3] DEBUG (com.nolio.releasecenter.services.release.execution.engine.StageExecutionEngineImpl:209) - Invoking sync-service com.nolio.releasecenter.services.release.execution.engine.ValidationStageSyncService@1a5c8926 for stage com.nolio.releasecenter.services.release.execution.engine.data.UnmodifiableStageExecutionDataWrapper@2aa58f00[innerExecutionData=com.nolio.releasecenter.services.release.execution.engine.data.StageExecutionDataImpl@7869aa2a[applicationId=4489000,containerName=DeployTest1,threadSafeStage=StageImpl{id=7929000, environmentId=null, agentGroupId=null, startTime=1541520005118, endTime=null, mode=RUNNING, ownerUsername='superuser', type=VALIDATION, cachedEnvironmentName=null, stopUserName='null', runCondition=PREVIOUS_SUCCESS, mustSucceed=true, startAutomatically=true},buildOrVersion=,stageContainer=com.nolio.liquor.utils.StageContainer@5836b42d[containerType=DEPLOYMENT,containerId=7927000],moduleExecutionsMap={},stageProgress=100.0,releaseState=PRE_RUN],innerStage=StageImpl{id=7929000, environmentId=null, agentGroupId=null, startTime=1541520005118, endTime=null, mode=RUNNING, ownerUsername='superuser', type=VALIDATION, cachedEnvironmentName=null, stopUserName='null', runCondition=PREVIOUS_SUCCESS, mustSucceed=true, startAutomatically=true},unmodifiableModuleExecutionsMap={}].
Highlights of message #2: same highlights as message #1, except:
  • The type=VALIDATION is something that the backend RA Management server does to make sure that everything it needs is available (agents, parameters, etc..). This would be executed as soon as the job is submitted based on the option "Execute pre-deployment step immediately" being selected when submitting the deployment.
 
  1. 2018-11-06 11:00:05,560 [StageExecutorTask-3] DEBUG (com.nolio.releasecenter.services.release.execution.engine.StageExecutionEngineImpl:464) - Stage is done: com.nolio.releasecenter.services.release.execution.engine.data.UnmodifiableStageExecutionDataWrapper@2aa58f00[innerExecutionData=com.nolio.releasecenter.services.release.execution.engine.data.StageExecutionDataImpl@7869aa2a[applicationId=4489000,containerName=DeployTest1,threadSafeStage=StageImpl{id=7929000, environmentId=null, agentGroupId=null, startTime=1541520005118, endTime=1541520005540, mode=FINISHED, ownerUsername='superuser', type=VALIDATION, cachedEnvironmentName=null, stopUserName='null', runCondition=PREVIOUS_SUCCESS, mustSucceed=true, startAutomatically=true},buildOrVersion=,stageContainer=com.nolio.liquor.utils.StageContainer@5836b42d[containerType=DEPLOYMENT,containerId=7927000],moduleExecutionsMap={},stageProgress=100.0,releaseState=FINISHED],innerStage=StageImpl{id=7929000, environmentId=null, agentGroupId=null, startTime=1541520005118, endTime=1541520005540, mode=FINISHED, ownerUsername='superuser', type=VALIDATION, cachedEnvironmentName=null, stopUserName='null', runCondition=PREVIOUS_SUCCESS, mustSucceed=true, startAutomatically=true},unmodifiableModuleExecutionsMap={}]
Highlights of message #3: same as message #2. 
 
  1. 2018-11-06 11:03:15,049 [eventsProcessingHandler[job:3]-1] DEBUG (com.nolio.releasecenter.services.release.execution.engine.StageExecutionEngineImpl:464) - Stage is done: com.nolio.releasecenter.services.release.execution.engine.data.UnmodifiableStageExecutionDataWrapper@3cc7b3e7[innerExecutionData=com.nolio.releasecenter.services.release.execution.engine.data.StageExecutionDataImpl@6a1ad1d0[applicationId=4489000,containerName=DeployTest1,threadSafeStage=StageImpl{id=7930000, environmentId=5715000, agentGroupId=null, startTime=1541520184650, endTime=1541520195029, mode=FINISHED, ownerUsername='testuser1', type=RUN, cachedEnvironmentName=Environment for Single Server Architecture, stopUserName='null', runCondition=PREVIOUS_SUCCESS, mustSucceed=true, startAutomatically=true},buildOrVersion=,stageContainer=com.nolio.liquor.utils.StageContainer@76149b2d[containerType=DEPLOYMENT,containerId=7927000],moduleExecutionsMap={7942000=com.nolio.releasecenter.services.release.execution.engine.data.ModuleExecutionDataImpl@19bf551},stageProgress=100.0,releaseState=FINISHED],innerStage=StageImpl{id=7930000, environmentId=5715000, agentGroupId=null, startTime=1541520184650, endTime=1541520195029, mode=FINISHED, ownerUsername='testuser1', type=RUN, cachedEnvironmentName=Environment for Single Server Architecture, stopUserName='null', runCondition=PREVIOUS_SUCCESS, mustSucceed=true, startAutomatically=true},unmodifiableModuleExecutionsMap={7942000=com.nolio.releasecenter.services.release.execution.engine.data.UnmodifiableModuleExecutionDataWrapper@c2260e}]
Highlights of message #4: 
  • The type=RUN is a reflection of the deployment phase. 
  • The username shown in these messages is the user who manually executed the deployment. 
  • It's good to review the containerName value and make sure it reflects the name of the deployment you're interested in. 
  • The containerId (which is equal to the ReleaseID of the deployment) value can also be used to verify you are looking at the details of the correct deployment.
  • The "StageImpl{id=7930000" portion of the message is 
 
    1. 2018-11-06 11:03:15,496 [StageExecutorTask-5] DEBUG (com.nolio.releasecenter.services.release.execution.engine.StageExecutionEngineImpl:464) - Stage is done: com.nolio.releasecenter.services.release.execution.engine.data.UnmodifiableStageExecutionDataWrapper@79636a5c[innerExecutionData=com.nolio.releasecenter.services.release.execution.engine.data.StageExecutionDataImpl@2955c5c2[applicationId=4489000,containerName=DeployTest1,threadSafeStage=StageImpl{id=7931000, environmentId=5715000, agentGroupId=null, startTime=1541520195435, endTime=1541520195476, mode=FINISHED, ownerUsername='testuser1', type=POST_DEPLOYMENT, cachedEnvironmentName=Environment for Single Server Architecture, stopUserName='null', runCondition=PREVIOUS_SUCCESS, mustSucceed=true, startAutomatically=true},buildOrVersion=,stageContainer=com.nolio.liquor.utils.StageContainer@1f4a9853[containerType=DEPLOYMENT,containerId=7927000],moduleExecutionsMap={},stageProgress=100.0,releaseState=FINISHED],innerStage=StageImpl{id=7931000, environmentId=5715000, agentGroupId=null, startTime=1541520195435, endTime=1541520195476, mode=FINISHED, ownerUsername='testuser1', type=POST_DEPLOYMENT, cachedEnvironmentName=Environment for Single Server Architecture, stopUserName='null', runCondition=PREVIOUS_SUCCESS, mustSucceed=true, startAutomatically=true},unmodifiableModuleExecutionsMap={}]
    Highlights of message #5: 
    • The type=POST_DEPLOYMENT is a reflection of the post deployment phase.