diff --git a/CHANGELOG.md b/CHANGELOG.md index 728c3b12..0f7b4296 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/Dockerfile b/Dockerfile index d5c46181..98e23800 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" \ diff --git a/README.md b/README.md index 2e73a6e9..7112df0b 100644 --- a/README.md +++ b/README.md @@ -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`. | diff --git a/assets/runtime/config/master.yml b/assets/runtime/config/master.yml index 63acfb16..4ab032ec 100644 --- a/assets/runtime/config/master.yml +++ b/assets/runtime/config/master.yml @@ -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 diff --git a/assets/runtime/env-defaults.sh b/assets/runtime/env-defaults.sh index 5ad82357..91c2352e 100755 --- a/assets/runtime/env-defaults.sh +++ b/assets/runtime/env-defaults.sh @@ -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 diff --git a/assets/runtime/functions.sh b/assets/runtime/functions.sh index 005ebff3..56cd3a29 100755 --- a/assets/runtime/functions.sh +++ b/assets/runtime/functions.sh @@ -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" \