[Fix] Armada Operator/Dag - Task Id and Xcom Key

It was found that the airflow worker pod did not go through the
upgrade workflow even though the conditions for upgrade were met.
This happened after the armada operator was refactored [0]. This
patch set is meant to correct this behavior.

The CI/CD team informed us that we should increase the default time
out values for 'prepare_node_timeout' and 'post_apply_timeout' based
on their testing in the integration lab. Hence this patch set will also
update the default values for these 2 variables.

[0] https://review.gerrithub.io/#/c/404637/

Change-Id: Ic08ab04121b0bdae8673892cfd919475e812f98f
This commit is contained in:
Anthony Lin 2018-03-27 05:30:35 +00:00
parent 4c71cc2c83
commit ee1a97cdc5
4 changed files with 7 additions and 7 deletions

View File

@ -187,7 +187,7 @@ class CommonStepFactory(object):
Defines a function to decide whether to upgrade airflow
worker. The decision will be based on the xcom value that
is retrieved from the 'armada_apply' task
is retrieved from the 'armada_post_apply' task
"""
# DAG ID will be parent + subdag name
dag_id = self.parent_dag_name + '.' + dn.ARMADA_BUILD_DAG_NAME
@ -195,7 +195,7 @@ class CommonStepFactory(object):
# Check if Shipyard/Airflow were upgraded by the workflow
upgrade_airflow = kwargs['ti'].xcom_pull(
key='upgrade_airflow_worker',
task_ids='armada_apply',
task_ids='armada_post_apply',
dag_id=dag_id)
# Go to the branch to upgrade Airflow worker if the Shipyard

View File

@ -52,7 +52,7 @@ class DeploymentConfigurationOperator(BaseOperator):
"physical_provisioner.destroy_timeout": 900,
"physical_provisioner.join_wait": 120,
"physical_provisioner.prepare_node_interval": 30,
"physical_provisioner.prepare_node_timeout": 1000,
"physical_provisioner.prepare_node_timeout": 1800,
"physical_provisioner.prepare_site_interval": 10,
"physical_provisioner.prepare_site_timeout": 300,
"physical_provisioner.verify_interval": 10,
@ -67,7 +67,7 @@ class DeploymentConfigurationOperator(BaseOperator):
"armada.get_releases_timeout": 300,
"armada.get_status_timeout": 300,
"armada.manifest": "full-site",
"armada.post_apply_timeout": 1800,
"armada.post_apply_timeout": 2700,
"armada.validate_design_timeout": 600
}

View File

@ -88,7 +88,7 @@ class XcomPuller(object):
of Armada Apply"""
source_task = 'armada_post_apply'
source_dag = 'armada_build'
key = 'attempted_failed_install_upgrade'
key = 'get_attempted_failed_install_upgrade'
return self._get_xcom(source_task=source_task,
dag_id=source_dag,
key=key)

View File

@ -16,7 +16,7 @@ data:
destroy_timeout: 900
join_wait: 120
prepare_node_interval: 30
prepare_node_timeout: 1000
prepare_node_timeout: 1800
prepare_site_interval: 10
prepare_site_timeout: 300
verify_interval: 10
@ -31,5 +31,5 @@ data:
get_releases_timeout: 300
get_status_timeout: 300
manifest: 'full-site'
post_apply_timeout: 1800
post_apply_timeout: 2700
validate_design_timeout: 600