cannot resume a stack after it was action-checked while suspended

Bug #1506042 reported by Removed by request
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Triaged
Medium
Unassigned

Bug Description

A stack cannot resume, since state CHECK_COMPLETE is invalid for resuming.
IMO safest thing here is to disable check on a suspended stack.

Revision history for this message
Sergey Kraynev (skraynev) wrote :

Amit, I thought about it several times, but looks like it will not do it more safer...
Probably the right solution is to revise events for previous states and if it was suspended before the check or something else (what allowed after suspend) we may do resume.
I am not the fan of the simple disabling such check.

Changed in heat:
importance: Undecided → Medium
milestone: none → mitaka-1
status: New → Confirmed
Masco (masco)
Changed in heat:
assignee: nobody → Masco Kaliyamoorthy (masco)
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/237427

Changed in heat:
status: Confirmed → In Progress
Revision history for this message
Sergey Kraynev (skraynev) wrote :

I have moved this bug to M2, because IMO it takes additional discussion for patch introduced on review.

Changed in heat:
milestone: mitaka-1 → mitaka-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Masco (<email address hidden>) on branch: master
Review: https://review.openstack.org/237427
Reason: not a correct way of solving this problem.

Masco (masco)
Changed in heat:
assignee: Masco (masco) → nobody
status: In Progress → Confirmed
Changed in heat:
milestone: mitaka-2 → mitaka-3
Changed in heat:
milestone: mitaka-3 → mitaka-rc1
Changed in heat:
milestone: mitaka-rc1 → newton-1
Di XiaoLi (dixiaoli)
Changed in heat:
assignee: nobody → Di XiaoLi (dixiaobj)
Revision history for this message
Di XiaoLi (dixiaoli) wrote :

for the situation:
Stack Create -> Stack Suspend -> Stack Check -> Stack Resume
stack resume will fail for State (u'CHECK', u'COMPLETE') invalid for resume.

IMO, we can do like this under this situation :
Stack Create -> Stack Suspend -> Stack Check -> Stack Resume -> Stack Suspend -> Stack Resume
So, we can fix this bug by adding the hint like this:
def resume(self):
        """Resume the resource.
        if self.state not in ((self.SUSPEND, self.COMPLETE),
                                         (self.RESUME, self.FAILED),
                                         (self.RESUME, self.COMPLETE)):
            exc = exception.Error(_('State %s invalid for resume, you must execute suspend first and then execute resume.')
                                  % six.text_type(self.state))
            raise exception.ResourceFailure(exc, self, action)
        LOG.info(_LI('resuming %s'), six.text_type(self))
        return self._do_action(action)

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/304502

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

Change abandoned by Di XiaoLi (<email address hidden>) on branch: master
Review: https://review.openstack.org/304502
Reason: Abandoned as it is not a good way of solving bug 1506042

Di XiaoLi (dixiaoli)
Changed in heat:
assignee: Di XiaoLi (dixiaobj) → nobody
Thomas Herve (therve)
Changed in heat:
status: In Progress → Triaged
milestone: newton-1 → next
Changed in heat:
assignee: nobody → Tanvir Talukder (tanvirt16)
Changed in heat:
status: Triaged → In Progress
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/362319

Zane Bitter (zaneb)
Changed in heat:
assignee: Tanvir Talukder (tanvirt16) → nobody
status: In Progress → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Zane Bitter (<email address hidden>) on branch: master
Review: https://review.opendev.org/362319

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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