Some resources do not work if their metadata is in
a wrong state, .e.g the metadata 'scaling_in_progress'
of scaling group/policy might be always True if engine
restarts while scaling.
This patch adds an interface 'handle_metadata_reset' for
resource, then the plugins can override it if needed.
We reset the metadata while marking resource healthy.
Change-Id: Ibd6c18acf6f3f24cf9bf16a524127850968062bc
Closes-Bug: #1651084
In some part in the code we import objects.
In the Openstack style guidelines they recommend to import only
modules.
We need to fix that.
Change-Id: I9c7481462ac7350bddae78c0a05af1e835a282e2
To avoid a race condition when updating a deleted stack, this catches the
NotFound exception specifically and ignores it. All other exceptions are
allowed to be raised.
Closes bug: 1582236
Change-Id: I23ddb71c806c0db1ed7ed4ee4ef831ca51605d65
Don't resize and send notifications when there is no
change in size i.e. max/min has been reached.
This also refactors some exception handling logic.
Change-Id: I1bb226b3067178dbdab2947609c53f3434aff9fe
Related-Bug: #1555748
Cooldown behavior changed in commit:
50cc71e33c
Restore the cooldown behavior so that when a group does not encounter
scaling activity, a cooldown period is not activated.
Closes-Bug: #1555748
Change-Id: Icf5df6a48afb9f56aa1c3f1622d33b9998aca39c
There are cases where it takes a long time to create a new resource as
requested by the scaling operation on an ASG resource, for instance, a
nova server creation followed by a complex SoftwareDeployment. During
this process, additional alarms may come in but failed to be blocked
by the current cooldown checking mechanism because the very first
timestamp has yet to be generated. This is leading to unexpected size
adjustment to the ASG.
This patch augments the existing cooldown checking mechanism with a
scaling-in-progress test so that additional alarms arriving during
the very first scaling operation will be ignored.
Change-Id: Ib8aa83eed366df7097c9cbb9247eca866ae4b620
Closes-Bug: #1375156
CooldownMixin is a class that can be shared between OS and AWS
auto-scaling implementations. This patch moves it to a shared
subdirectory.
Implements: partial-blueprint reorg-asg-code
Change-Id: I40e470460e84944d317f5b1772fc562abf62896d