stacker icon indicating copy to clipboard operation
stacker copied to clipboard

handle multiple users updating a stack at once

Open phobologic opened this issue 10 years ago • 4 comments

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.

phobologic avatar Aug 10 '15 22:08 phobologic

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

mwildehahn avatar Sep 08 '15 21:09 mwildehahn

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.

phobologic avatar Feb 19 '16 18:02 phobologic

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.

mwildehahn avatar Aug 30 '16 00:08 mwildehahn

Probably related to: https://github.com/remind101/stacker/issues/8

mwildehahn avatar Aug 30 '16 00:08 mwildehahn