Skip to content

Commit

Permalink
feat: Set the number of workers for the runner/wheel in the reactor
Browse files Browse the repository at this point in the history
  • Loading branch information
cdalvaro committed Dec 31, 2021
1 parent 65d21d5 commit 1a388e9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`. |
Expand Down
6 changes: 6 additions & 0 deletions assets/runtime/config/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions assets/runtime/env-defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion assets/runtime/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 1a388e9

Please sign in to comment.