docker-archive / deploykit

A toolkit for creating and managing declarative, self-healing infrastructure.
Apache License 2.0
2.25k stars 262 forks source link

Scaling out a single group via`manager group commit` updates every group #563

Closed kaufers closed 7 years ago

kaufers commented 7 years ago

We have a group definition with a managers and a workers group. We want to scale out the workers group and issued the following after updating the Allocation|Size from 1->2:

Group workers with plugin group plan: Adding 1 instances to increase the group size to 2
Group managers with plugin group plan: Performing a rolling update on 3 instances

In this case we did not want to perform a rolling update on any of the managers; we only wanted to scale out the workers.

Is there a different command we should use to only update a specific group? Or can this flow be updated to detect that nothing changed in the managers group and not do a rolling update?

It seems like we need a way to differentiate between performing a rolling update and a scale out (where only the allocations changed).

Thanks!

chungers commented 7 years ago

Can you add the groups.json that you used?

kaufers commented 7 years ago

Note that if I run a second commit right after the first I see:

Group workers with plugin group plan: Noop
Group managers with plugin group plan: Performing a rolling update on 3 instances
kaufers commented 7 years ago

The problem is that quorum groups DO NOT check for instance definition changes (only checks LogicalID):

https://github.com/docker/infrakit/blob/master/pkg/plugin/group/quorum.go#L37-L39

Scaler groups DO check this:

https://github.com/docker/infrakit/blob/master/pkg/plugin/group/scaler.go#L60-L67

The fix is to add a similar check to the quorum group PlanUpdate function.