Enforce upgrade_batch_tasks before upgrade_tasks order
If we really want upgrade_batch_tasks before the upgrade_tasks as described in the README then we should enforce the ordering Noticed this working on bug 1671504 upgrade tasks were being executed before batch upgrade tasks. Closes-Bug: 1678101 Change-Id: Iaa1bce960a37c072b5f8441132705a6bb6eb6ede
This commit is contained in:
parent
d286892c78
commit
299b9f5323
@ -32,15 +32,6 @@ parameters:
|
|||||||
type: string
|
type: string
|
||||||
hidden: true
|
hidden: true
|
||||||
|
|
||||||
conditions:
|
|
||||||
# Conditions to disable any steps where the task list is empty
|
|
||||||
{%- for role in roles %}
|
|
||||||
{{role.name}}UpgradeBatchConfigEnabled:
|
|
||||||
not:
|
|
||||||
equals:
|
|
||||||
- {get_param: [role_data, {{role.name}}, upgrade_batch_tasks]}
|
|
||||||
- []
|
|
||||||
{%- endfor %}
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
@ -98,12 +89,11 @@ resources:
|
|||||||
{{role.name}}UpgradeBatchConfig_Step{{step}}:
|
{{role.name}}UpgradeBatchConfig_Step{{step}}:
|
||||||
type: OS::TripleO::UpgradeConfig
|
type: OS::TripleO::UpgradeConfig
|
||||||
{%- if step > 0 %}
|
{%- if step > 0 %}
|
||||||
condition: {{role.name}}UpgradeBatchConfigEnabled
|
{%- if role in enabled_roles %}
|
||||||
{% if role.name in enabled_roles %}
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- {{role.name}}UpgradeBatch_Step{{step -1}}
|
- {{role.name}}UpgradeBatch_Step{{step -1}}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% else %}
|
{%- else %}
|
||||||
{% for role in roles if role.disable_upgrade_deployment|default(false) %}
|
{% for role in roles if role.disable_upgrade_deployment|default(false) %}
|
||||||
{% if deliver_script.update({'deliver': True}) %} {% endif %}
|
{% if deliver_script.update({'deliver': True}) %} {% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -123,13 +113,11 @@ resources:
|
|||||||
{%- for role in enabled_roles %}
|
{%- for role in enabled_roles %}
|
||||||
{{role.name}}UpgradeBatch_Step{{step}}:
|
{{role.name}}UpgradeBatch_Step{{step}}:
|
||||||
type: OS::Heat::SoftwareDeploymentGroup
|
type: OS::Heat::SoftwareDeploymentGroup
|
||||||
condition: {{role.name}}UpgradeBatchConfigEnabled
|
|
||||||
{%- if step > 0 %}
|
{%- if step > 0 %}
|
||||||
depends_on:
|
depends_on:
|
||||||
- {{role.name}}UpgradeBatch_Step{{step -1}}
|
{%- for role_inside in enabled_roles %}
|
||||||
{% else %}
|
- {{role_inside.name}}UpgradeBatch_Step{{step -1}}
|
||||||
depends_on:
|
{%- endfor %}
|
||||||
- {{role.name}}UpgradeBatchConfig_Step{{step}}
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
update_policy:
|
update_policy:
|
||||||
batch_create:
|
batch_create:
|
||||||
@ -183,10 +171,10 @@ resources:
|
|||||||
# do, and there should be minimal performance hit (creating the
|
# do, and there should be minimal performance hit (creating the
|
||||||
# config is cheap compared to the time to apply the deployment).
|
# config is cheap compared to the time to apply the deployment).
|
||||||
{%- if step > 0 %}
|
{%- if step > 0 %}
|
||||||
{% if role.name in enabled_roles %}
|
{%- if role in enabled_roles %}
|
||||||
depends_on:
|
depends_on:
|
||||||
- {{role.name}}Upgrade_Step{{step -1}}
|
- {{role.name}}Upgrade_Step{{step -1}}
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
properties:
|
properties:
|
||||||
UpgradeStepConfig: {get_param: [role_data, {{role.name}}, upgrade_tasks]}
|
UpgradeStepConfig: {get_param: [role_data, {{role.name}}, upgrade_tasks]}
|
||||||
@ -205,6 +193,11 @@ resources:
|
|||||||
{%- for role_inside in enabled_roles %}
|
{%- for role_inside in enabled_roles %}
|
||||||
- {{role_inside.name}}Upgrade_Step{{step -1}}
|
- {{role_inside.name}}Upgrade_Step{{step -1}}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
{%- else %}
|
||||||
|
depends_on:
|
||||||
|
{%- for role_inside in enabled_roles %}
|
||||||
|
- {{role_inside.name}}UpgradeBatch_Step{{batch_upgrade_steps_max -1}}
|
||||||
|
{%- endfor %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
properties:
|
properties:
|
||||||
name: {{role.name}}Upgrade_Step{{step}}
|
name: {{role.name}}Upgrade_Step{{step}}
|
||||||
|
Loading…
Reference in New Issue
Block a user