salt/doc/topics/targeting/batch.rst

24 lines
957 B
ReStructuredText
Raw Normal View History

2012-04-03 15:49:39 +00:00
Batch Size
----------
The ``-b`` (or ``--batch-size``) option allows commands to be executed on only
Fixed pedantic spelling errors picked up by lintian joe@unstable-builder:~/salt_017rc/salt$ lintian -I ../*.deb I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz softwares software - done I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz specifed specified - done I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz Targetting Targeting - done I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz targetted targeted - done I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz Dependant Dependent - done I: salt-common: FSSTND-dir-in-manual-page usr/share/man/man7/salt.7.gz:57301 /var/named/ - not done - example I: salt-common: FSSTND-dir-in-manual-page usr/share/man/man7/salt.7.gz:57320 /var/named/ - not done - example I: salt-common: FSSTND-dir-in-manual-page usr/share/man/man7/salt.7.gz:57339 /var/named/ - not done - example I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz recieve receive - done I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz allows to allows one to - done I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz allows to allows one to - done I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz dont don't - done I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz succesfully successfully - done I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz softwares software - done I: salt-common: spelling-error-in-manpage usr/share/man/man7/salt.7.gz These package This package - not done - legitimate
2013-09-20 12:01:20 +00:00
a specified number of minions at a time. Both percentages and finite numbers are
supported.
2012-04-03 15:49:39 +00:00
.. code-block:: bash
salt '*' -b 10 test.ping
2012-04-03 15:49:39 +00:00
salt -G 'os:RedHat' --batch-size 25% apache.signal restart
This will only run test.ping on 10 of the targeted minions at a time and then
restart apache on 25% of the minions matching ``os:RedHat`` at a time and work
through them all until the task is complete. This makes jobs like rolling web
server restarts behind a load balancer or doing maintenance on BSD firewalls
using carp much easier with salt.
The batch system maintains a window of running minions, so, if there are a
total of 150 minions targeted and the batch size is 10, then the command is
sent to 10 minions, when one minion returns then the command is sent to one
additional minion, so that the job is constantly running on 10 minions.