You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I'd like to roll out an application to a group of machines using batching. During these steps it's crucial that my upgrade doesn't fail for every machine (so that I end up with zero instances of the application). Failhard exists for a single host.
I propose some way to failhard also in terms of batch rollout, either using the existing failhard or a new batch_failhard(?) flag. What do you think? Interesting? Doable?
I'd be interested in an expanded use case. If the deploy succeeds on the first batch of minions, and one of the minions in the second batch fails, what's the argument for not continuing to try to roll out to the remainder of the minions? That's my issue -- in a large orchestration using state.orchestrate, you want to stop the run if something fails, because you don't want to deploy your app if the database setup didn't complete properly, for example. But in a batch situation, each minion is running the exact same command, just in batches. So I'm trying to figure out why you'd want to stop all the remaining minions if one in the middle failed.
This is actually a common case. Let's sassy that the SLS is failing because the hit server with your configs is down. If you have a package update that requires one it's possible that an incomplete run would leave the minion in a bad state. So, for batched roll outs I want to have some threshold of acceptable number of failures, to make sure that I don't bring the app down with a bad deploy.
Thanks @jacksontj - couldn't have said it better myself. Exactly what I was trying to convey. I agree that possibly setting a threshold (percentage-wise or fixed number of allowed failures) would be a good idea.
Activity
[-]Failhard for batches[/-][+]Failhard for batching[/+]basepi commentedon Apr 2, 2014
I'd be interested in an expanded use case. If the deploy succeeds on the first batch of minions, and one of the minions in the second batch fails, what's the argument for not continuing to try to roll out to the remainder of the minions? That's my issue -- in a large orchestration using state.orchestrate, you want to stop the run if something fails, because you don't want to deploy your app if the database setup didn't complete properly, for example. But in a batch situation, each minion is running the exact same command, just in batches. So I'm trying to figure out why you'd want to stop all the remaining minions if one in the middle failed.
jacksontj commentedon Apr 3, 2014
This is actually a common case. Let's sassy that the SLS is failing because the hit server with your configs is down. If you have a package update that requires one it's possible that an incomplete run would leave the minion in a bad state. So, for batched roll outs I want to have some threshold of acceptable number of failures, to make sure that I don't bring the app down with a bad deploy.
basepi commentedon Apr 3, 2014
Makes sense! Thanks for the explanation, that's all I needed. =)
JensRantil commentedon Apr 4, 2014
Thanks @jacksontj - couldn't have said it better myself. Exactly what I was trying to convey. I agree that possibly setting a threshold (percentage-wise or fixed number of allowed failures) would be a good idea.
JensRantil commentedon Nov 25, 2014
FYI, Ansible supports this.
jacksontj commentedon Apr 7, 2015
Just found this email buried away ;) I just fixed up the batching stuff, so this would actually be easy to add at this point. The only question remaining is how do we determine that an execution failed. I'm thinking we just want to mimic the behavior in the module state (https://github.com/saltstack/salt/blob/develop/salt/states/module.py#L227) checking for retcode or a boolean. Sound good?
basepi commentedon Apr 16, 2015
Seems reasonable to me.
Add failhard option to salt batching
Add failhard option to salt batching