stacker
stacker copied to clipboard
handle multiple users updating a stack at once
Right now there's no special logic that would stop 2 people from attempting to update stacks at the same time. In general the second attempt will see the stacks being updated, and probably do the right thing, but I can see some cases where that wouldn't happen and could leave stacks in invalid states.
So - probably worth having some way to lock the stack while you're working on it. Not sure where that would be handled.
since we publish the templates to an s3 bucket, maybe we add a "LOCKED" file that will prevent another user from updating the stack at the same time.
when the stack has finished updating or an error happens, we'll remove "LOCKED"?
ie. namespace: "stacker-dev"
s3: stacker-dev/LOCKED
What about if, before stacker will do a build/destroy, it first checks the current status of each of the stacks in it's plan - if any of them are in an 'updating' state, it will bail out? Not sure if that's better than the lock file idea.
Yea. Something I run into every once in awhile when developing a new blueprint is something goes wrong with the blueprint and I can't just re-run stacker since something else might be in the UPDATING state. Right now it just dumps an exception from boto, we should probably handle it better.
Probably related to: https://github.com/remind101/stacker/issues/8