]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
autoscaling : Fix issue when scaling to zero instances
authorSteven Hardy <shardy@redhat.com>
Thu, 27 Jun 2013 15:20:56 +0000 (16:20 +0100)
committerSteven Hardy <shardy@redhat.com>
Thu, 27 Jun 2013 15:30:22 +0000 (16:30 +0100)
commite1aa8e791be34a144a404fe87d869ad9f9a3311e
treeecd5aae49b038af8637511a857008c222a76fc2b
parente8b893b7735b1912cbfe30f610780f13b5576f68
autoscaling : Fix issue when scaling to zero instances

As noted in https://review.openstack.org/#/c/34564, we lack
coverage of the scenario when MinSize is 0 and we scale down
to zero instances then try to do a delete.  We do the wrong
thing here, by creating a GroupedInstance object with name '',
and this would also result in an incorrect update to the
LoadBalancer.  Fix is to reset the resource_id to None.

Fixes bug #1195364
Change-Id: Ie3a52badf35f7e660de9a8f38635d2a09463123a
heat/engine/resources/autoscaling.py
heat/tests/test_autoscaling.py