stack tags set to null after update failed

Bug #1701098 reported by Walter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Rabi Mishra

Bug Description

If a stack is updated and the update goes to UPDATE_FAILED for any reason the tags associated with that stack are set to null. If stack update run again (after fixing reason for failure) and this succeeds the tags are not re-applied and remain null

Rabi Mishra (rabi)
Changed in heat:
assignee: nobody → Rabi Mishra (rabi)
importance: Undecided → Medium
Revision history for this message
Rabi Mishra (rabi) wrote :

I think this happens for all updates and not only for failed ones. I'm not sure what would be the correct behaviour.

a. create a stack with tags
b. update the stack (without any tags) -> If we keep the existing tags, then there would not be any way to remove all tags from a stack other than overwriting them with a new set of tags.

However, I think we should keep the existing tags when using '--existing' flag with an update.

Revision history for this message
Walter (walterrr) wrote :

Yes, you are correct, i just reproduced using CLI. I didn't notice as our code was hiding this behaviour because we re-apply the tags on an update (not using CLI). It was when and update failed this code was not executed and highlighted the issue.

I would expect that if a set of tags we applied the default behaviour should to be to keep them on an update without the --existing option. Perphaps you could implement a "--drop-tags" or equivalent to clear these if this was ever required. I would assume most use cases would want to keep them.

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

Fix proposed to branch: master
Review: https://review.openstack.org/480021

Changed in heat:
status: New → In Progress
Revision history for this message
Rabi Mishra (rabi) wrote :

> I would expect that if a set of tags we applied the default behaviour should to be to keep them on an update without the --existing option

Probably it can be useful from user perspective. However, would be unlike how things like parameters, template etc are treated. I think the keeping the existing tags when using '--existing' flag would be a good compromise.

You can use the flag with update to keep the existing tags (unless you provide new tags).

Rico Lin (rico-lin)
Changed in heat:
milestone: none → pike-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/480021
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=ed0beb6871b9a64c7a51ea85fd824e7c406343b3
Submitter: Jenkins
Branch: master

commit ed0beb6871b9a64c7a51ea85fd824e7c406343b3
Author: rabi <email address hidden>
Date: Thu Jun 29 16:11:36 2017 +0530

    Keep existing stack tags for patch update

    When updating a stack, we overwrite the existing tags.
    So if no tags are specified during update, all existing
    tags are removed. It would atleast be good to keep the
    existing tags when doing a patch update (with `--existing`).

    Change-Id: I910fe5237605405791eb6daa81c422bf7fd9eaa1
    Closes-Bug: #1701098

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/487642

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 9.0.0.0b3

This issue was fixed in the openstack/heat 9.0.0.0b3 development milestone.

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

Reviewed: https://review.openstack.org/487642
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4a089058c54ff4ee887d8504b886ef760f57d1d2
Submitter: Jenkins
Branch: stable/ocata

commit 4a089058c54ff4ee887d8504b886ef760f57d1d2
Author: rabi <email address hidden>
Date: Thu Jun 29 16:11:36 2017 +0530

    Keep existing stack tags for patch update

    When updating a stack, we overwrite the existing tags.
    So if no tags are specified during update, all existing
    tags are removed. It would atleast be good to keep the
    existing tags when doing a patch update (with `--existing`).

    Change-Id: I910fe5237605405791eb6daa81c422bf7fd9eaa1
    Closes-Bug: #1701098
    (cherry picked from commit ed0beb6871b9a64c7a51ea85fd824e7c406343b3)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 8.0.5

This issue was fixed in the openstack/heat 8.0.5 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.