Allow to scale when group is in CHECK_COMPLETE

When a signal of scaling policy arrive, we will find
the group in stack by stack.resource_by_refid(), now
we kick out the group if the it is in CHECK_COMPLETE.
This change will correct this.

Change-Id: I37308b85d2c8d53d24157320c7c25852f0f8d761
Closes-Bug:# 1655527
This commit is contained in:
huangtianhua 2017-01-11 14:15:57 +08:00
parent 71ca073a97
commit 09fc0442ef
2 changed files with 4 additions and 2 deletions

View File

@ -756,7 +756,8 @@ class Stack(collections.Mapping):
(r.RESUME, r.IN_PROGRESS),
(r.RESUME, r.COMPLETE),
(r.UPDATE, r.IN_PROGRESS),
(r.UPDATE, r.COMPLETE)) and
(r.UPDATE, r.COMPLETE),
(r.CHECK, r.COMPLETE)) and
(r.FnGetRefId() == refid or r.name == refid)):
return r

View File

@ -1075,7 +1075,8 @@ class StackTest(common.HeatTestCase):
(rsrc.RESUME, rsrc.IN_PROGRESS),
(rsrc.RESUME, rsrc.COMPLETE),
(rsrc.UPDATE, rsrc.IN_PROGRESS),
(rsrc.UPDATE, rsrc.COMPLETE)):
(rsrc.UPDATE, rsrc.COMPLETE),
(rsrc.CHECK, rsrc.COMPLETE)):
rsrc.state_set(action, status)
self.assertEqual(rsrc, self.stack.resource_by_refid('aaaa'))