Skip to content

Commit ead1ff0

Browse files
authored
Merge pull request #68028 from dwoz/merge/master/3007.x-2025-05-16
Merge forward 3007.x into master
2 parents fb413fc + 8f28dc8 commit ead1ff0

File tree

25 files changed

+182
-101
lines changed

25 files changed

+182
-101
lines changed

.github/actions/setup-relenv/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ runs:
4848
env:
4949
RELENV_FETCH_VERSION: "${{ inputs.version }}"
5050
run: |
51+
python3 -m pip install relenv[toolchain]
5152
python3 -m relenv toolchain fetch --arch=${{ inputs.arch }}
5253
5354
- name: Fetch Native Python Build

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ jobs:
433433
with:
434434
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
435435
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
436-
relenv-version: "0.19.0"
436+
relenv-version: "0.19.2"
437437
python-version: "3.10.17"
438438
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
439439
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
@@ -448,7 +448,7 @@ jobs:
448448
with:
449449
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
450450
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
451-
relenv-version: "0.19.0"
451+
relenv-version: "0.19.2"
452452
python-version: "3.10.17"
453453
source: "onedir"
454454
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}

.github/workflows/nightly.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ jobs:
428428
with:
429429
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
430430
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
431-
relenv-version: "0.19.0"
431+
relenv-version: "0.19.2"
432432
python-version: "3.10.17"
433433
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
434434
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
@@ -443,7 +443,7 @@ jobs:
443443
with:
444444
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
445445
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
446-
relenv-version: "0.19.0"
446+
relenv-version: "0.19.2"
447447
python-version: "3.10.17"
448448
source: "onedir"
449449
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -463,7 +463,7 @@ jobs:
463463
with:
464464
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
465465
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
466-
relenv-version: "0.19.0"
466+
relenv-version: "0.19.2"
467467
python-version: "3.10.17"
468468
source: "src"
469469
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}

.github/workflows/scheduled.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ jobs:
476476
with:
477477
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
478478
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
479-
relenv-version: "0.19.0"
479+
relenv-version: "0.19.2"
480480
python-version: "3.10.17"
481481
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
482482
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
@@ -491,7 +491,7 @@ jobs:
491491
with:
492492
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
493493
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
494-
relenv-version: "0.19.0"
494+
relenv-version: "0.19.2"
495495
python-version: "3.10.17"
496496
source: "onedir"
497497
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}

.github/workflows/staging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ jobs:
473473
with:
474474
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
475475
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
476-
relenv-version: "0.19.0"
476+
relenv-version: "0.19.2"
477477
python-version: "3.10.17"
478478
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
479479
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
@@ -489,7 +489,7 @@ jobs:
489489
with:
490490
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
491491
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
492-
relenv-version: "0.19.0"
492+
relenv-version: "0.19.2"
493493
python-version: "3.10.17"
494494
source: "onedir"
495495
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -510,7 +510,7 @@ jobs:
510510
with:
511511
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
512512
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
513-
relenv-version: "0.19.0"
513+
relenv-version: "0.19.2"
514514
python-version: "3.10.17"
515515
source: "src"
516516
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}

changelog/65514.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make sure the comment field is populated when test=True for the reg state

changelog/66627.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added the ability to configure the cluster event port and added documentation for it

changelog/67903.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed if arguments are passed to the key delete all, -D, it will throw an error

cicd/shared-gh-workflows-context.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
nox_version: "2022.8.7"
22
python_version: "3.10.17"
3-
relenv_version: "0.19.0"
3+
relenv_version: "0.19.2"
44
release_branches:
55
- "3006.x"
66
- "3007.x"

conf/master

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,3 +1357,29 @@
13571357

13581358
# Set a list of clients to enable in in the API
13591359
#netapi_enable_clients: []
1360+
1361+
1362+
##### Master Cluster Settings #####
1363+
#####################################################
1364+
# Settings for configuring salt master to work in a cluster configuration behind
1365+
# a load balancer.
1366+
1367+
# When defined, the master will operate in cluster mode. The master will send
1368+
# the cluster key and id to minions instead of its own key and id. The master
1369+
# will also forward its local event bus to other masters defined by
1370+
# ``cluster_peers``
1371+
#cluster_id: master_cluster
1372+
1373+
# Defines the other masters in the cluster. Can be IP addresses or hostnames
1374+
#cluster_peers:
1375+
# - master 2
1376+
# - master 3
1377+
1378+
# When ``cluster_pki_dir`` is defined, this sets the location of where this
1379+
# cluster will store its cluster public and private key as well as any minion
1380+
# keys. This setting will default to the value of ``pki_dir``, but should be
1381+
# changed to the filesystem location shared between peers in the cluster.
1382+
#cluster_pki_dir: /my/gluster/share/pki
1383+
1384+
# The port required to be open for a master cluster to properly function
1385+
#cluster_pool_port: 4520

doc/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@
352352
]
353353

354354
man_pages = [
355-
("contents", "salt", "Salt Documentation", authors, 7),
356355
("ref/cli/salt", "salt", "salt", authors, 1),
357356
("ref/cli/salt-master", "salt-master", "salt-master Documentation", authors, 1),
358357
("ref/cli/salt-minion", "salt-minion", "salt-minion Documentation", authors, 1),

doc/ref/configuration/master.rst

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,9 @@ When defined, the master will operate in cluster mode. The master will send the
218218
cluster key and id to minions instead of its own key and id. The master will
219219
also forward its local event bus to other masters defined by ``cluster_peers``
220220

221-
222221
.. code-block:: yaml
223222
224-
cluster_id: master
223+
cluster_id: master_cluster
225224
226225
.. conf_master:: cluster_peers
227226

@@ -230,8 +229,8 @@ also forward its local event bus to other masters defined by ``cluster_peers``
230229

231230
.. versionadded:: 3007
232231

233-
When ``cluster_id`` is defined, this setting is a list of other master
234-
(hostnames or ips) that will be in the cluster.
232+
When ``cluster_peers`` is defined, this setting is a list of other master
233+
(hostnames or IPs) that will be in the cluster.
235234

236235
.. code-block:: yaml
237236
@@ -246,15 +245,29 @@ When ``cluster_id`` is defined, this setting is a list of other master
246245

247246
.. versionadded:: 3007
248247

249-
When ``cluster_id`` is defined, this sets the location of where this cluster
250-
will store its cluster public and private key as well as any minion keys. This
251-
setting will default to the value of ``pki_dir``, but should be changed
252-
to the filesystem location shared between peers in the cluster.
248+
When ``cluster_pki_dir`` is defined, this sets the location of where this
249+
cluster will store its cluster public and private key as well as any minion
250+
keys. This setting will default to the value of ``pki_dir``, but should be
251+
changed to the filesystem location shared between peers in the cluster.
253252

254253
.. code-block:: yaml
255254
256-
cluster_pki: /my/gluster/share/pki
255+
cluster_pki_dir: /my/gluster/share/pki
256+
257+
258+
.. conf_master:: cluster_port
259+
260+
``cluster_pool_port``
261+
---------------------
262+
263+
.. versionadded:: 3007.2
264+
265+
When ``cluster_pool_port`` is defined, it sets the TCP port number HAProxy
266+
listens on for incoming TCP connections. The default is ``4520``
267+
268+
.. code-block:: yaml
257269
270+
cluster_pool_port: 4520
258271
259272
.. conf_master:: extension_modules
260273

doc/topics/tutorials/master-cluster.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ when operating as a cluster, minion keys are stored in the `cluster_pki_dir`
3232
instead of the master's `pki_dir`.
3333

3434

35-
Reference Implimentation
35+
Reference Implementation
3636
========================
3737

3838
Gluster: https://docs.gluster.org/en/main/Quick-Start-Guide/Quickstart/

pkg/debian/rules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ override_dh_auto_build:
2626
export PY=$$(build/onedir/venv/bin/python3 -c 'import sys; sys.stdout.write("{}.{}".format(*sys.version_info)); sys.stdout.flush()') \
2727
&& build/onedir/venv/bin/python3 -m pip install -r requirements/static/ci/py$${PY}/tools.txt
2828
build/onedir/venv/bin/relenv fetch --python=$${SALT_PYTHON_VERSION}
29+
build/onedir/venv/bin/pip3 install relenv[toolchain]
2930
build/onedir/venv/bin/relenv toolchain fetch
3031
build/onedir/venv/bin/tools pkg build onedir-dependencies --arch $${SALT_PACKAGE_ARCH} --relenv-version=$${SALT_RELENV_VERSION} --python-version $${SALT_PYTHON_VERSION} --package-name build/onedir/salt --platform linux
3132

pkg/rpm/salt.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ cd $RPM_BUILD_DIR
179179
export PY=$(build/venv/bin/python3 -c 'import sys; sys.stdout.write("{}.{}".format(*sys.version_info)); sys.stdout.flush()')
180180
build/venv/bin/python3 -m pip install -r %{_salt_src}/requirements/static/ci/py${PY}/tools.txt
181181
build/venv/bin/relenv fetch --python=${SALT_PYTHON_VERSION}
182+
build/venv/bin/pip3 install relenv[toolchain]
182183
build/venv/bin/relenv toolchain fetch
183184
cd %{_salt_src}
184185
$RPM_BUILD_DIR/build/venv/bin/tools pkg build onedir-dependencies --arch ${SALT_PACKAGE_ARCH} --relenv-version=${SALT_RELENV_VERSION} --python-version ${SALT_PYTHON_VERSION} --package-name $RPM_BUILD_DIR/build/salt --platform linux

requirements/constraints.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
wheel
22
setuptools < 80.0.0
3-
setuptools-scm < 8.0.0
43
networkx >= 3.0,< 3.2
54
pip >= 23.3,< 24.0 ; python_version < '3.12'
65
pip >24 ; python_version >= '3.12'

salt/channel/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ def _publish_daemon(self, **kwargs):
10431043
)
10441044
os.nice(self.opts["event_publisher_niceness"])
10451045
self.io_loop = tornado.ioloop.IOLoop.current()
1046-
tcp_master_pool_port = 4520
1046+
tcp_master_pool_port = self.opts["cluster_pool_port"]
10471047
self.pushers = []
10481048
self.auth_errors = {}
10491049
for peer in self.opts.get("cluster_peers", []):

salt/config/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ def _gather_buffer_space():
196196
# to define where minion keys and the cluster private key will be
197197
# stored.
198198
"cluster_pki_dir": str,
199+
# The port required to be open for a master cluster to properly function
200+
"cluster_pool_port": int,
199201
# Use a module function to determine the unique identifier. If this is
200202
# set and 'id' is not set, it will allow invocation of a module function
201203
# to determine the value of 'id'. For simple invocations without function
@@ -1674,6 +1676,7 @@ def _gather_buffer_space():
16741676
"cluster_id": None,
16751677
"cluster_peers": [],
16761678
"cluster_pki_dir": None,
1679+
"cluster_pool_port": 4520,
16771680
"features": {},
16781681
"publish_signing_algorithm": "PKCS1v15-SHA1",
16791682
}
@@ -4116,7 +4119,7 @@ def apply_master_config(overrides=None, defaults=None):
41164119

41174120
prepend_root_dir(opts, prepend_root_dirs)
41184121

4119-
# When a cluster id is defined, make sure the other nessicery bits a
4122+
# When a cluster id is defined, make sure the other necessary bits are
41204123
# defined.
41214124
if "cluster_id" not in opts:
41224125
opts["cluster_id"] = None
@@ -4134,7 +4137,7 @@ def apply_master_config(overrides=None, defaults=None):
41344137
log.warning("Cluster peers defined without a cluster_id, ignoring.")
41354138
opts["cluster_peers"] = []
41364139
if opts.get("cluster_pki_dir", None):
4137-
log.warning("Cluster pki defined without a cluster_id, ignoring.")
4140+
log.warning("Cluster pki dir defined without a cluster_id, ignoring.")
41384141
opts["cluster_pki_dir"] = None
41394142

41404143
# Enabling open mode requires that the value be set to True, and

salt/master.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def handle_key_rotate(self, now, drop_file_wait=5):
387387
self.opts["cachedir"], self.opts["user"], self.opts["id"]
388388
)
389389
# There is currently no concept of a leader in a master
390-
# cluster. Lets fake it till we make it with a little
390+
# cluster. Let's fake it till we make it with a little
391391
# waiting period.
392392
time.sleep(drop_file_wait)
393393
to_rotate = (

0 commit comments

Comments
 (0)