external upgrade/update run --tags container_image_prepare does not update images in the Undercloud

Bug #1844109 reported by Jose Luis Franco
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sergii Golovatiuk

Bug Description

After the following refactoring: https://github.com/openstack/tripleo-heat-templates/commit/f20fddaee115d6067213661ce192cfec07b11df8#diff-f7c5f38a4d563adbdab6abeea22a2fd3 , the containers_prepare_images tasks have been moved from the service template into a role. The tags "container_image_prepare" which is used during upgrade/update to execute the containers image preparation where also moved into the role itself.

What's occuring right now is that the external upgrade/update command, which is used to run those tasks is not able to identify that it has to run those tasks, even though the --tags container_image_prepare is being properly passed:

Command run:

openstack overcloud external-upgrade run \
    --stack overcloud \
    --tags container_image_prepare 2>&1
log: https://storage.gra1.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_65d/674050/13/check/tripleo-ci-centos-7-scenario000-multinode-oooq-container-upgrades/65dcda3/logs/undercloud/home/zuul/overcloud_prepare_containers.sh.txt.gz

Ansible command translation:
ansible-playbook-2 -v /var/lib/mistral/ee41013d-f6ee-4c14-93df-dab21d21b727/external_upgrade_steps_playbook.yaml --limit all --module-path /usr/share/ansible-modules --become --become-user root --inventory-file /var/lib/mistral/ee41013d-f6ee-4c14-93df-dab21d21b727/inventory.yaml --tags container_image_prepare "$@"

log: https://storage.gra1.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_65d/674050/13/check/tripleo-ci-centos-7-scenario000-multinode-oooq-container-upgrades/65dcda3/logs/undercloud/var/lib/mistral/ee41013d-f6ee-4c14-93df-dab21d21b727/ansible-playbook-command.sh.txt.gz

External upgrade --tags container_image_prepare log:

External deploy steps tasks:

The expected result would be to have the container image prepare taks from the tripleo-container-image-prepare role executed during step 1.

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

https://github.com/openstack/tripleo-heat-templates/commit/f20fddaee115d6067213661ce192cfec07b11df8#diff-f7c5f38a4d563adbdab6abeea22a2fd3R101 needs to be import_role so the tags would start working via statical imports. see https://docs.ansible.com/ansible/devel/user_guide/playbooks_reuse_includes.html#includes-vs-imports

And loops would have to be rewritten then as we cannot iterate import_role...
There may be more places like that.

Changed in tripleo:
status: New → Triaged
tags: added: stein-backport-potential
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/682672

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-heat-templates (master)

Change abandoned by Emilien Macchi (<email address hidden>) on branch: master
Review: https://review.opendev.org/682672
Reason: We are facing gate issue: https://bugs.launchpad.net/tripleo/+bug/1844446

To clear the gate we need to abandon this patch and I will restore once the gate is ready again to land patches in TripleO. Please don't touch this patch, and ask on #tripleo Wes or Emilien for any question. Thanks for your patience.

Changed in tripleo:
milestone: train-rc1 → ussuri-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

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

commit 184ed6aef66559b3d212e47a829e9928f417dc7c
Author: Sergii Golovatiuk <email address hidden>
Date: Tue Sep 17 17:07:52 2019 +0200

    Replace include_role with import_role

    Replace include_role with import_role to fix tags as upgrade/update
    invokes ansible with "--tags container_image_prepare"

    Change-Id: I396ff9bae534e9137da30c7a260b49f579ee8bfe
    Closes-Bug: #1844109

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.3.0

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

Revision history for this message
Uemit Seren (timeu) wrote :

Can this be backported to Train ?

Revision history for this message
Uemit Seren (timeu) wrote :

ok sorry my bad, this was apparently already backported to Train

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

Other bug subscribers