feat: Set the number of workers for the runner/wheel in the reactor

This commit is contained in:
Carlos Álvaro
2021-12-30 22:26:46 +01:00
parent 65d21d5187
commit 1a388e9cc2
6 changed files with 16 additions and 3 deletions

View File

@@ -4,6 +4,10 @@ This file only reflects the changes that are made in this image.
Please refer to the [Salt 3004 Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3004.html)
for the list of changes in SaltStack.
**3004_5**
- Set the number of workers for the runner/wheel in the reactor by setting `SALT_REACTOR_WORKER_THREADS` env variable.
**3004_4**
- Fix an issue restarting `salt-master` processes with `supervisorctl` when reloading config.

View File

@@ -7,7 +7,7 @@ ARG VCS_REF
ENV SALT_VERSION="3004" \
PYTHON_VERSION="3.9"
ENV IMAGE_VERSION="${SALT_VERSION}_4"
ENV IMAGE_VERSION="${SALT_VERSION}_5"
ENV SALT_DOCKER_DIR="/etc/docker-salt" \
SALT_ROOT_DIR="/etc/salt" \

View File

@@ -525,7 +525,8 @@ Below you can find a list with the available options that can be used to customi
| `SALT_MASTER_PUBKEY_SIGNATURE` | The name of the file in the master's pki-directory that holds the pre-calculated signature of the master's public-key. Default: `master_pubkey_signature` |
| `SALT_MASTER_ROOT_USER` | Forces `salt-master` to be runned as `root` instead of `salt`. Default: `False` |
| `SALT_GITFS_SSH_PRIVATE_KEY` | The name of the ssh private key for gitfs. Default: `gitfs_ssh` |
| `SALT_GITFS_SSH_PUBLIC_KEY` | The name of the ssh public key for gitfs. Default: `gitfs_ssh.pub` |
| `SALT_GITFS_SSH_PUBLIC_KEY` | The name of the ssh public key for gitfs. Default: `gitfs_ssh`.pub` |
| `SALT_REACTOR_WORKER_THREADS` | The number of workers for the runner/wheel in the reactor. Default: `10`. |
| `PUID` | Sets the uid for user `salt` to the specified uid. Default: `1000`. |
| `PGID` | Sets the gid for user `salt` to the specified gid. Default: `1000`. |
| `USERMAP_UID` (**deprecated**) | Same as `PUID`. Support will be removed in Salt 3005 release in favor of `PUID`. |

View File

@@ -85,6 +85,12 @@ pillar_roots:
- {{SALT_BASE_DIR}}/pillar
###### Reactor Settings #####
###########################################
# Configure the number of workers for the runner/wheel in the reactor.
reactor_worker_threads: {{SALT_REACTOR_WORKER_THREADS}}
##### Syndic settings #####
##########################################
# The Salt syndic is used to pass commands through a master from a higher

View File

@@ -12,6 +12,7 @@ SALT_LOG_ROTATE_RETENTION=${SALT_LOG_ROTATE_RETENTION:-52}
# https://docs.saltstack.com/en/latest/ref/configuration/master.html
SALT_RESTART_MASTER_ON_CONFIG_CHANGE=${SALT_RESTART_MASTER_ON_CONFIG_CHANGE:-false}
SALT_REACTOR_WORKER_THREADS=${SALT_REACTOR_WORKER_THREADS:-10}
##### Logging settings #####
# https://docs.saltstack.com/en/latest/ref/configuration/master.html#master-logging-settings

View File

@@ -268,7 +268,8 @@ function configure_salt_master()
SALT_BASE_DIR \
SALT_CACHE_DIR \
SALT_CONFS_DIR \
SALT_KEYS_DIR
SALT_KEYS_DIR \
SALT_REACTOR_WORKER_THREADS
# Update keys configuration
update_template "${SALT_ROOT_DIR}/master" \