Bug 1746815 - External tasks for update are not working anymore.
Summary: External tasks for update are not working anymore.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 15.0 (Stein)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 15.0 (Stein)
Assignee: RHOS Maint
QA Contact: Raviv Bar-Tal
URL:
Whiteboard:
Depends On:
Blocks: 1727808 1741247
TreeView+ depends on / blocked
 
Reported: 2019-08-29 10:20 UTC by mbollo
Modified: 2023-09-14 05:42 UTC (History)
14 users (show)

Fixed In Version: openstack-tripleo-heat-templates-10.6.1-0.20190827130436.96443f9.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-21 11:24:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ansible ansible issues 32015 0 None closed Ansible include vs. include_tasks with tags 2020-08-21 09:21:36 UTC
Launchpad 1839520 0 None None None 2019-08-29 10:20:50 UTC
OpenStack gerrit 675534 0 None MERGED Add tags always into external update tasks. 2020-08-21 09:21:37 UTC
OpenStack gerrit 677786 0 None MERGED Add tags always into external update tasks. 2020-08-21 09:21:36 UTC
Red Hat Product Errata RHEA-2019:2811 0 None None None 2019-09-21 11:25:34 UTC

Description mbollo 2019-08-29 10:20:50 UTC
In rocky, we updated the image for the overcloud running:

   openstack overcloud external-update run --debug --tags container_image_prepare

In stein that command has no impact:

PLAY [External update steps] ***************************************************

PLAY [External deploy steps] ***************************************************

PLAY RECAP *********************************************************************
compute-0 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
compute-1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
controller-0 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
controller-1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
controller-2 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
undercloud : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

Thursday 08 August 2019 10:24:21 -0400 (0:00:00.551) 0:00:05.981 *******
===============================================================================

external_update_steps is empty so no worries there, but external_deploy_steps_tasks.yaml isn't and contains the container_image_prepare tag.

But it's not run.

doing:

sudo podman exec -it mistral_executor bash

and adding external to the list of tags to the run command, giving that:

ansible-playbook-3 -vvv /var/lib/mistral/e2e16aca-291b-49a8-bfc1-2a8a1f2f4e40/external_update_steps_playbook.yaml --limit all --module-path /usr/share/ansible-modules --become --become-user root --inventory-file /var/lib/mistral/e2e16aca-291b-49a8-bfc1-2a8a1f2f4e40/inventory.yaml --tags external,container_image_prepare "$@"

in /var/lib/mistral/config-download-latest/ansible-playbook-command.sh

does trigger a run of the container_image_prepare associated tasks.

Problem is with that change I8b3bf3ba3d7c2cfbe1187218c51f619e65efe0e5

When we switched from include to include_tasks we change the tags behavior.

Here's an example:

(undercloud) [stack@undercloud-0 ~]$ cat test.yaml
---
- hosts: all
  gather_facts: no
  tasks:

  - name: "Include tasks file"
    include: tasks.yml

  - name: "Include_tasks tasks file"
    include_tasks: tasks1.yml
(undercloud) [stack@undercloud-0 ~]$ cat tasks.yml
- name: "Debug tag1"
  debug:
    msg: "init"
  tags:
  - tag1
(undercloud) [stack@undercloud-0 ~]$ cat tasks1.yml
- name: "Debug tag1"
  debug:
    msg: "init1"
  tags:
  - tag1

now running:

(undercloud) [stack@undercloud-0 ~]$ ansible-playbook -i my-inventory.yml ./test.yaml -t tag1

PLAY [all] **********************************************************************************************************************************************************************************************************

TASK [Debug tag1] ***************************************************************************************************************************************************************************************************
ok: [undercloud] => {
    "msg": "init"
}
ok: [controller-0] => {
    "msg": "init"
}
ok: [controller-1] => {
    "msg": "init"
}
ok: [controller-2] => {
    "msg": "init"
}
ok: [compute-0] => {
    "msg": "init"
}
ok: [compute-1] => {
    "msg": "init"
}

PLAY RECAP **********************************************************************************************************************************************************************************************************
compute-0 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
compute-1 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
controller-0 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
controller-1 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
controller-2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
undercloud : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

we can see that only the "include" tasks are really included. The include_tasks has a different behavior, it doesn't look into the tasks for the tags there.

Comment 12 Carlos Camacho 2019-09-05 20:47:47 UTC
Hi Raviv, from our today's tests, we should be able to verify this.

Comment 13 Carlos Camacho 2019-09-06 12:36:34 UTC
As per https://bugzilla.redhat.com/show_bug.cgi?id=1741247 they are both verified as they report the same issue.

Comment 17 errata-xmlrpc 2019-09-21 11:24:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:2811

Comment 18 Red Hat Bugzilla 2023-09-14 05:42:34 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.