fixes saltstack/salt#31468 allow users to enable 'queue=True' for all state runs via config file

This commit is contained in:
nicholasmhughes 2022-12-21 13:25:18 -05:00
parent e2ea857a57
commit d8c5180bf5
No known key found for this signature in database
GPG key ID: CB87254A2EA67E01
4 changed files with 39 additions and 0 deletions

1
changelog/31468.added Normal file
View file

@ -0,0 +1 @@
Allow users to enable 'queue=True' for all state runs via config file

View file

@ -591,6 +591,16 @@
#
#state_aggregate: False
# Instead of failing immediately when another state run is in progress, a value
# of True will queue the new state run to begin running once the other has
# finished. This option starts a new thread for each queued state run, so use
# this option sparingly. Additionally, it can be set to an integer representing
# the maximum queue size which can be attained before the state runs will fail
# to be queued. This can prevent runaway conditions where new threads are
# started until system performance is hampered.
#
#state_queue: False
# Disable requisites during state runs by specifying a single requisite
# or a list of requisites to disable.
#

View file

@ -2274,6 +2274,31 @@ aggregate just those types.
state_aggregate:
- pkg
.. conf_minion:: state_queue
``state_queue``
---------------
Default: ``False``
Instead of failing immediately when another state run is in progress, a value
of ``True`` will queue the new state run to begin running once the other has
finished. This option starts a new thread for each queued state run, so use
this option sparingly.
.. code-block:: yaml
state_queue: True
Additionally, it can be set to an integer representing the maximum queue size
which can be attained before the state runs will fail to be queued. This can
prevent runaway conditions where new threads are started until system
performance is hampered.
.. code-block:: yaml
state_queue: 2
.. conf_minion:: state_verbose
``state_verbose``

View file

@ -366,6 +366,8 @@ VALID_OPTS = immutabletypes.freeze(
# to the jid. WARNING: A change to the jid format may break external
# applications that depend on the original format.
"unique_jid": bool,
# Governs whether state runs will queue or fail to run when a state is already running
"state_queue": bool,
# Tells the highstate outputter to show successful states. False will omit successes.
"state_verbose": bool,
# Specify the format for state outputs. See highstate outputter for additional details.
@ -1181,6 +1183,7 @@ DEFAULT_MINION_OPTS = immutabletypes.freeze(
"state_auto_order": True,
"state_events": False,
"state_aggregate": False,
"state_queue": False,
"snapper_states": False,
"snapper_states_config": "root",
"acceptance_wait_time": 10,