deploykit icon indicating copy to clipboard operation
deploykit copied to clipboard

Scale Group size down to 0

Open wongwill86 opened this issue 6 years ago • 1 comments

Hello,

There are cases in which I would like a group to be scaled down to 0, i.e. for autoscaling. but right now i think https://github.com/docker/infrakit/blob/master/pkg/plugin/group/group.go#L344 is preventing me from doing that.

Group swarm-workers at 0 instancesCRIT[10-05|22:23:28] error executing                          module=main cmd=infrakit err="Allocation must not be blank" fn=main.main
Allocation must not be blank

I also tried using destroy-instances but all i get is:

infrakit group destroy-instances swarm-workers
Initiated.

but the instances are never destroyed.

obviously i can destroy the group altogether but when i want to scale back up again i would then have to recommit the groups file which isn't ideal.

It would be nice if we can scale the group down to 0.

Thanks!

wongwill86 avatar Oct 09 '17 18:10 wongwill86

Also, can we commit a group of 0 size?

The use case is that our scripts always want to commit a workers group, even if it is of size 0. We would like the group to exist so that we could statically define in in a LB configuration (ie, we want to the config to always include group/workers and group/managers in the backend nodes, even if workers has 0 members).

kaufers avatar Oct 09 '17 20:10 kaufers