Upgrade: all tasks are run, tags seem to be ignored

Bug #1830892 reported by Jiří Stránský
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Jiří Stránský

Bug Description

I hit this in the latest CI run of https://review.opendev.org/#/c/657612/7

There are tags tagged with 'never' and 'system_upgrade_prepare', but they are run anyway in our upgrade CI, which shouldn't be happening, given which commands tripleo-upgrade currently runs.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.opendev.org/661945

Changed in tripleo:
assignee: nobody → Jiří Stránský (jistr)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.opendev.org/661945
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=6d9560e1777250921ee8c62b55ca7d3638cf1e07
Submitter: Zuul
Branch: master

commit 6d9560e1777250921ee8c62b55ca7d3638cf1e07
Author: Jiri Stransky <email address hidden>
Date: Wed May 29 11:33:28 2019 +0000

    Respect tags in upgrade tasks

    There seems to be a difference between how include_tasks and
    import_tasks work.

    `include_tasks` applies properties on the inclusion itself, and if we
    want to apply something on the included tasks, we need to use `apply`
    dict. We previously had to add `always` tag onto `include_tasks` to
    make the inclusion happen when we ran upgrade with `--tags`.

    `import_tasks`, on the other hand, is processed more like a block than
    an individual task, and all its properties get applied on the tasks
    inside. This meant that the `always` tag got applied on all tags in
    the upgrade playbook, instead of on the import itself, which broke use
    of tags in `upgrade_tasks`. This is now fixed by removing the tags
    from `import_tasks`. The import should happen always regardless if
    there are any `tags` on the import.

    Change-Id: I66a4ed99f9e0cc199899494813073b4a085d99e7
    Closes-Bug: #1830892

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 11.0.0

This issue was fixed in the openstack/tripleo-heat-templates 11.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/679971

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/stein)

Reviewed: https://review.opendev.org/679971
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=907271797e9bd0286a7abd2327227dec99ebb6d1
Submitter: Zuul
Branch: stable/stein

commit 907271797e9bd0286a7abd2327227dec99ebb6d1
Author: Jiri Stransky <email address hidden>
Date: Wed May 29 11:33:28 2019 +0000

    Respect tags in upgrade tasks

    There seems to be a difference between how include_tasks and
    import_tasks work.

    `include_tasks` applies properties on the inclusion itself, and if we
    want to apply something on the included tasks, we need to use `apply`
    dict. We previously had to add `always` tag onto `include_tasks` to
    make the inclusion happen when we ran upgrade with `--tags`.

    `import_tasks`, on the other hand, is processed more like a block than
    an individual task, and all its properties get applied on the tasks
    inside. This meant that the `always` tag got applied on all tags in
    the upgrade playbook, instead of on the import itself, which broke use
    of tags in `upgrade_tasks`. This is now fixed by removing the tags
    from `import_tasks`. The import should happen always regardless if
    there are any `tags` on the import.

    Change-Id: I66a4ed99f9e0cc199899494813073b4a085d99e7
    Closes-Bug: #1830892
    (cherry picked from commit 6d9560e1777250921ee8c62b55ca7d3638cf1e07)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 10.6.1

This issue was fixed in the openstack/tripleo-heat-templates 10.6.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.