Skip to content

Commit 580a97e

Browse files
authored
Merge branch 'main' into copy-fail
2 parents 98f1226 + 995c282 commit 580a97e

26 files changed

Lines changed: 2077 additions & 90 deletions

File tree

.github/CODEOWNERS

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
# Notify @EWDurbin for all opened Issues and Pull Requests
1+
# Notify @JacobCoffee for all opened Issues and Pull Requests
22
* @JacobCoffee
3+
4+
# Additionally, notify Stan for docs things
5+
.github/workflows/docs-redirects.yml @StanFromIreland @JacobCoffee
6+
salt/docs/* @StanFromIreland @JacobCoffee
7+
tests/docs-redirects/* @StanFromIreland @JacobCoffee

pillar/base/users/antoine.sls

Lines changed: 0 additions & 10 deletions
This file was deleted.

pillar/base/users/barry.sls

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
users:
22
barry:
33
access:
4-
docs:
5-
allowed: true
6-
groups:
7-
- docs
8-
downloads:
9-
allowed: true
10-
groups:
11-
- downloads
124
gnumailman:
135
allowed: true
146
sudo: true

pillar/base/users/gbrandl.sls

Lines changed: 0 additions & 20 deletions
This file was deleted.

pillar/base/users/larry.sls

Lines changed: 0 additions & 19 deletions
This file was deleted.

pillar/base/users/loewis.sls

Lines changed: 0 additions & 16 deletions
This file was deleted.

pillar/base/users/stan.sls

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
users:
2+
stan:
3+
access:
4+
docs:
5+
allowed: true
6+
groups:
7+
- docs
8+
- docsbuild
9+
sudo: true
10+
fullname: Stan Ulbrych
11+
ssh_keys:
12+
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKtjkM3s7q8kLYuQ0GkcLKXO+kFdJIBEVZ1Cg2IbkCrR

salt/_extensions/pillar/ca.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import binascii
44
import datetime
5+
import fcntl
56
import os.path
67

78
import salt.loader
@@ -342,10 +343,18 @@ def ext_pillar(minion_id, pillar, base="/etc/ssl", name="PSFCA", cert_opts=None)
342343
opts["CN"] = certificate
343344
opts["days"] = config.get("days", 1)
344345

345-
create_ca_signed_cert(base, name, **opts)
346+
# Lock per-CN to prevent concurrent pillar compilations from
347+
# racing on the same cert/key files.
348+
lockp = os.path.join(base, name, "certs", "{}.lock".format(certificate))
349+
lock_fd = open(lockp, "w")
350+
try:
351+
fcntl.flock(lock_fd, fcntl.LOCK_EX)
352+
create_ca_signed_cert(base, name, **opts)
353+
cert_data = get_ca_signed_cert(base, name, certificate)
354+
finally:
355+
fcntl.flock(lock_fd, fcntl.LOCK_UN)
356+
lock_fd.close()
346357

347-
# Add the signed certificates to the pillar data
348-
cert_data = get_ca_signed_cert(base, name, certificate)
349358
data["tls"]["certs"][certificate] = cert_data
350359

351360
# Collect ACME certs (acme.cert) for this minion based on its roles

salt/buildbot/config/nginx.conf.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ server {
4848
proxy_http_version 1.1;
4949
proxy_set_header Upgrade $http_upgrade;
5050
proxy_set_header Connection "Upgrade";
51-
proxy_pass http://localhost:9010/ws;
51+
proxy_pass http://127.0.0.1:9010/ws;
5252
}
5353
}

salt/consul/etc/acl.json.jinja

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
{% set acl_token = salt['pillar.get']("consul:acl:tokens:default") %}
2+
{% if not acl_token %}
3+
{# Fail rendering rather than write an empty acl.json, which would break consul #}
4+
{{ MISSING_CONSUL_ACL_TOKEN }}
5+
{% endif %}
16
{
2-
{% if "default" in salt['pillar.get']("consul:acl:tokens", []) %}
3-
"acl_token": "{{ pillar['consul']['acl']['tokens']['default'] }}"
4-
{% endif %}
7+
"acl_token": "{{ acl_token }}"
58
}

0 commit comments

Comments
 (0)