BROOKLYN-212: AutoScaling doesn’t retry if InsufficientCapacity
- Adds Resizable.InsufficientCapacityException, thrown by
Resizable.resize() if could not grow at all.
- DynamicCluster catches NoMachinesAvailableException, and rethrows
as InsufficientCapacityException in resize().
- AutoScalerPolicy catches InsufficientCapacityException, and sets
insufficientCapacityHighWaterMark to record the max size it can get
to. Does not try again to resize above that, unless the highWaterMark
is explicitly cleared by reconfiguring that config value.
- Tests:
- Changes TestCluster to include history of sizes and desiredSizes
- Changes TestCluster, so can throw InsufficientCapacityException
when gets to a particular size.
- Test for DynamicCluster throwing InsufficientCapacityException
- Test for AutoScalerPolicyMetricTest, to not resize above the failure
level again.
- Test for AutoScalerPolicyNoMoreMachinesTest, for when BYON location
has run out of machines in a DynamicCluster.