Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-server/pull/923
  
    @tbouron The `DynamicCluster.resize(int)` effector returns the new size. In 
your example of `resize(15)`, it would now resize to 10 and return the value 
10. In the case of calling `DynamicCluster.resizeByDelta(...)` it will return 
the `Collection<Entity>` that was created, so one could look at the size 
returned.
    
    This is already the way it behaves if the location just has insufficient 
capacity. For example, if using a bring-your-own-nodes with limited capacity, 
it will add as many as it can and return the new size (the other members will 
be created and will fail, either being quarantined or deleted depending on the 
configuration). The same applies if your cloud has limited capacity (e.g. aws 
service-limits for the number of instances in a region).
    
    I think that model is easier to program against (or at least it requires 
fewer changes to all the places that already use `resize()`), compared to 
requiring extra parameters/configuration.
    
    I think as it stands it is hard to use - e.g. it won't play nicely with our 
existing auto-scaler policy. I think the change in this PR is the simplest way 
to make it behave closer to what people/policies desire (i.e. if one says 
"resize" then resize as much as you can).


---

Reply via email to