rackerlabs/otter — pull request #403 by manishtomar (2013-10-01 00:33:16+00:00)
Title: State based orchestration - path to atom-hopper integration (please review)

This is the first step towards self-healing atom-hopper integration based orchestration. WARNING: Non-working code. There are no tests yet. Would like people to look at the code.

The `GroupState` stores `desired` number of servers that need to be active at any time. It also keeps track of servers that have errored, currently deleting and have been deleted. The `execute_group_transition` function looks at the current state and takes actions to bring number servers to `desired`. This function is called whenever any server in the group gets added/deleted/errored. This is also called when a policy has to be executed.

Otter goes stateless with this change since it reacts based on events from atom-hopper. It doesn't have Job to keep track of pending servers.