rollback-on-failure is not deleting the sync points
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Anant Patil |
Bug Description
Steps to reproduce:
1. create a stack with http://
2. Update the above stack with rollback option with template: http://
In second template a resource is marked to fail, so the rollback happens but in DB the sync points remain.
mysql> select * from sync_point;
+------
| entity_id | traversal_id | is_update | atomic_key | stack_id | input_data | created_at | updated_at |
+------
| 1 | db1ef9e9-
| 1 | db1ef9e9-
| 2 | db1ef9e9-
| 2b2d256b-
+------
4 rows in set (0.00 sec)
Changed in heat: | |
assignee: | nobody → Anant Patil (ananta) |
Changed in heat: | |
milestone: | none → newton-rc1 |
importance: | Undecided → High |
Changed in heat: | |
milestone: | newton-rc1 → none |
milestone: | none → nexton-rc2 |
tags: | added: newton-rc-potential |
The problem is caused due to commit 084d0eb20f6636b 63721eb3c5a9db0 8858d05ec5 where we update the current traversal in state_set, and by doing so we loose the previous traversal. Since we loose the previous traversal ID, there is no way to go back and delete it. The code at https:/ /github. com/openstack/ heat/blob/ master/ heat/engine/ check_resource. py#L75 is causing the issue.
My worry is that we do state_set at various places and implicitly setting the current traversal is not a good idea. The solution is to probably just update the current traversal as another instruction/method so that we know what action needs to be taken explicitly when we do so.