Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait between scenario runs #346

Open
Niksko opened this issue Jul 22, 2021 · 2 comments
Open

Wait between scenario runs #346

Niksko opened this issue Jul 22, 2021 · 2 comments

Comments

@Niksko
Copy link
Contributor

Niksko commented Jul 22, 2021

It took me an embarrassingly long time to realise that

    config:
      runStrategy:
        minSecondsBetweenRuns: 600
        maxSecondsBetweenRuns: 900
        strategy: "random"
    scenarios:
    - name: Scenario A
    ...
    - name: Scenario B
    ...

causes PowerfulSeal to do the following:

  1. Randomly select scenario A or B, and run it
  2. Immediately select the other scenario and run it
  3. Only now wait between 600 and 900 seconds

What I had assumed would happen was:

  1. Randomly select scenario A or B, and run it
  2. Wait 600 to 900 seconds
  3. Select scenario A or B, and run it
  4. repeat forever

Would it be useful to add a mode that does this?

@seeker89
Copy link
Contributor

Yes, I think that it would!

Better yet, you're not the first person to run into this, maybe let's just change the behaviour to the one you described. The least astonishment principle in action.

Thanks for the issue!

@jcstanaway
Copy link
Contributor

I'd prefer this to be configurable. It could be difficult to manage the min/max times. In our case, we run large shared clusters and have teams create their own scenarios in their own namespaces (and use OPA Gatekeeper so scenarios can only target pods in the namespace in which the scenario was created (as well as other restrictions)). As the number of scenarios increase, the time between a particular scenario is executed increases significantly.

Some teams want to control how frequently a scenario is executed (e.g., randomly once a day). They can do that today since we set min=max and they can then use the probability setting. As scenarios are added by other teams, those existing scenarios will run less and less often (or somehow know when scenarios are created/deleted and everyone adjust their probabilities - not really a workable solution).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants