Skip to content

Commit 976d2e1

Browse files
author
root
committed
fix: orchestrator deploy via systemd unit and certbot via podman run
- Replace 'podman-compose up -d' in step_deploy_option_a/b with 'systemctl start perfsonar-testpoint': the compose invocation lacks --systemd=always and --cgroupns host, causing systemd inside the Ubuntu container to fail with 'cgroup Permission denied' on fresh RHEL 9 hosts. The systemd unit (installed by install-systemd- units.sh) already has the correct flags. - Replace 'podman-compose up -d certbot' with a direct 'podman run' command that includes the Podman socket mount (/run/podman/podman.sock) needed by the certbot-deploy-hook.sh to restart the testpoint container after successful certificate renewal. - Bump version to 1.1.2. Both issues discovered during psmsu01.aglt2.org fresh install.
1 parent 120c457 commit 976d2e1

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

docs/perfsonar/tools_scripts/perfSONAR-orchestrator.sh

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
3-
# Version: 1.1.1
3+
# Version: 1.1.2
44
# Author: Shawn McKee, University of Michigan
55
# Acknowledgements: Supported by IRIS-HEP and OSG-LHC
66

@@ -218,14 +218,24 @@ step_auto_update_compose() {
218218
step_deploy_option_a() {
219219
run /opt/perfsonar-tp/tools_scripts/seed_testpoint_host_dirs.sh
220220
run bash -c "curl -fsSL https://raw.githubusercontent.com/osg-htc/networking/master/docs/perfsonar/tools_scripts/docker-compose.testpoint.yml -o /opt/perfsonar-tp/docker-compose.yml"
221-
run bash -c "cd /opt/perfsonar-tp && podman-compose up -d"
221+
# Start via the systemd unit (which has --systemd=always --cgroupns host needed
222+
# for systemd inside the container); podman-compose up -d lacks these flags.
223+
run systemctl daemon-reload
224+
run systemctl start perfsonar-testpoint
225+
log "Waiting 30s for container to initialise..."
226+
sleep 30
222227
run podman ps
223228
}
224229

225230
step_deploy_option_b() {
226231
run /opt/perfsonar-tp/tools_scripts/seed_testpoint_host_dirs.sh
227232
run bash -c "curl -fsSL https://raw.githubusercontent.com/osg-htc/networking/master/docs/perfsonar/tools_scripts/docker-compose.testpoint-le-auto.yml -o /opt/perfsonar-tp/docker-compose.yml"
228-
run bash -c "cd /opt/perfsonar-tp && podman-compose up -d"
233+
# Start via the systemd unit (which has --systemd=always --cgroupns host needed
234+
# for systemd inside the container); podman-compose up -d lacks these flags.
235+
run systemctl daemon-reload
236+
run systemctl start perfsonar-testpoint
237+
log "Waiting 30s for container to initialise..."
238+
sleep 30
229239
run podman ps
230240

231241
# Auto-detect FQDNs from reverse DNS of all configured IPs
@@ -318,8 +328,19 @@ step_deploy_option_b() {
318328
log "Continuing installation — certificate can be obtained later."
319329
fi
320330

321-
run podman restart perfsonar-testpoint || true
322-
run podman start certbot || true
331+
run systemctl restart perfsonar-testpoint || true
332+
# Start the certbot renewal container with Podman socket for the deploy hook
333+
run podman rm -f certbot || true
334+
run podman run -d --name certbot --net=host \
335+
--security-opt label=disable \
336+
-v /etc/letsencrypt:/etc/letsencrypt:Z \
337+
-v /var/www/html:/var/www/html:z \
338+
-v /run/podman/podman.sock:/run/podman/podman.sock:ro \
339+
-v "/opt/perfsonar-tp/tools_scripts/certbot-deploy-hook.sh:/etc/letsencrypt/renewal-hooks/deploy/certbot-deploy-hook.sh:ro" \
340+
--entrypoint /bin/sh \
341+
docker.io/certbot/certbot:latest \
342+
'-c' 'trap exit TERM; while :; do certbot renew --deploy-hook /etc/letsencrypt/renewal-hooks/deploy/certbot-deploy-hook.sh; sleep 12h & wait ${!}; done' \
343+
|| log "WARNING: certbot renewal container failed to start; set it up manually."
323344
run podman exec certbot certbot renew --dry-run || true
324345
else
325346
log "Skipping certificate issuance (missing --fqdn/--email or no FQDNs detected). You can do this later."

docs/perfsonar/tools_scripts/scripts.sha256

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ e1944123e17c89e8f202cca960f147397d64ae1e675af132c84b02ced2564abb node_exporter.
1717
76f49ce6e5ee00a0f35026ee6b87b44448355549fe78b3b0873b49bbece1ccf1 testpoint-entrypoint-wrapper.sh
1818
50dfab90bc21d5c566b713f48b00b079a32a8b8756432a0d0f66ac6a64e6e581 perfSONAR-health-monitor.sh
1919
d8e3cc4a03725c7fb6e12c13e5036e7c6a3af301a1f1e728690ce9ad3ab8aa96 install_tools_scripts.sh
20-
f127c37eb2441cd9c674b1286e3bd1333c09435bc393c0c43245327d2cc012e7 perfSONAR-orchestrator.sh
20+
084538e013a84e8e475bb601b3cfca4774df4c708363673697bc975cb04e7360 perfSONAR-orchestrator.sh
2121
2615a29d65e285391adb547046584c4534ea548e69571b67e0cf35773b010c57 perfSONAR-diagnostic-report.sh
2222
b8ef81ab410cfe1a8a5732290c01cf9f2acc6fc8fdfa0068fd21854f3d7fec9c docs/perfsonar/tools_scripts/perfSONAR-install-flowd-go.sh
2323
39d226a857eb1a0956003c75ca8b558fcb55c63176286ca9597f031d08cb38a7 docs/perfsonar/tools_scripts/update-perfsonar-deployment.sh

0 commit comments

Comments
 (0)