Skip to content

Failhard for batching #11721

Closed
Closed

Description

@JensRantil

This issue came out of https://groups.google.com/d/msg/salt-users/65hWu18UITw/sJojnZktrfIJ.

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?

Activity

  1. changed the title [-]Failhard for batches[/-] [+]Failhard for batching[/+] on Apr 2, 2014
  2. basepi commented on Apr 2, 2014

    @basepi
    Contributor

    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.

  3. added and removed on Apr 2, 2014
  4. added this to the milestone on Apr 2, 2014
  5. jacksontj commented on Apr 3, 2014

    @jacksontj
    Contributor

    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.

  6. basepi commented on Apr 3, 2014

    @basepi
    Contributor

    Makes sense! Thanks for the explanation, that's all I needed. =)

  7. modified the milestones: , on Apr 3, 2014
  8. JensRantil commented on Apr 4, 2014

    @JensRantil
    ContributorAuthor

    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.

  9. JensRantil commented on Nov 25, 2014

    @JensRantil
    ContributorAuthor

    FYI, Ansible supports this.

  10. jacksontj commented on Apr 7, 2015

    @jacksontj
    Contributor

    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?

  11. basepi commented on Apr 16, 2015

    @basepi
    Contributor

    Seems reasonable to me.

  12. added 2 commits that reference this issue on Apr 20, 2015
    38704a5
    2c760f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions