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

[BUG] Batch mode creates batches in a weird way #58246

Open
Oloremo opened this issue Aug 19, 2020 · 2 comments
Open

[BUG] Batch mode creates batches in a weird way #58246

Oloremo opened this issue Aug 19, 2020 · 2 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Documentation Relates to Salt documentation severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around time-estimate-single-day
Milestone

Comments

@Oloremo
Copy link
Contributor

Oloremo commented Aug 19, 2020

Description

Salt has the ability to run something in batches. I noticed that:

  1. Minions split per batch is very weird
  2. using batch sometimes leads to an exception

Setup
I have a cluster with 33 minions - an odd number of minions could be important here.

Seems like it's only reproducible while doing state.apply, running something like test.ping will work just fine.

The exception is the same as I reported here: #56273

Steps to Reproduce the behavior
I run something like:

 salt -b 10 \* state.apply formula.java test=True

And get this: https://gist.github.com/Oloremo/d1af8fef0410b2979584afa427fca555
Note that I removed all state output since it's irrelevant here.

Expected behavior
With 33 minions and batch 10 I'd expect to have 4 batches: 10, 10, 10, 3

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
           Salt: 3000.3

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 2.11.1
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.8 (default, Aug  7 2019, 17:28:10)
   python-gnupg: 0.4.5
         PyYAML: 3.11
          PyZMQ: 18.0.2
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.1

System Versions:
           dist: centos 7.6.1810 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-957.1.3.el7.x86_64
         system: Linux
        version: CentOS Linux 7.6.1810 Core```
</details>

**Additional context**
Add any other context about the problem here.
@Oloremo Oloremo added the Bug broken, incorrect, or confusing behavior label Aug 19, 2020
@Oloremo
Copy link
Contributor Author

Oloremo commented Aug 25, 2020

Hm, it maybe works correctly just badly named. Should be something "max-concurrent"

I kinda guess it could work as "no more than N at once", so with batch 10 if 1 finishes and 9 are still running - salt goes ahead and launch one more minion since 9 < 10.

@dwoz
Copy link
Contributor

dwoz commented Sep 3, 2020

@Oloremo I agree the name is not great but I doubt it could reasonably be changed now because of how long the feature has been around.

We should at least update some documentation to make sure this is more clear.

@dwoz dwoz removed their assignment Sep 3, 2020
@dwoz dwoz added Documentation Relates to Salt documentation and removed needs-triage labels Sep 3, 2020
@dwoz dwoz added this to the Approved milestone Sep 3, 2020
@barbaricyawps barbaricyawps added time-estimate-single-day severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around labels Mar 21, 2022
@anilsil anilsil modified the milestones: Approved, Argon v3008 Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Documentation Relates to Salt documentation severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around time-estimate-single-day
Projects
None yet
Development

No branches or pull requests

6 participants