From 2d2ef7d80e8a50118899758514d979d19023d314 Mon Sep 17 00:00:00 2001 From: Thomas Beermann Date: Wed, 19 Jun 2019 16:34:26 +0200 Subject: [PATCH] make long proxy name configurable + fix small bug in daemons configuration --- daemons/rucio.cfg.j2 | 4 ++-- fts-cron/renew_fts_proxy_atlas.sh.j2 | 12 ++---------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/daemons/rucio.cfg.j2 b/daemons/rucio.cfg.j2 index 6471de0..8d179d1 100644 --- a/daemons/rucio.cfg.j2 +++ b/daemons/rucio.cfg.j2 @@ -52,11 +52,11 @@ cacert = {{ RUCIO_CFG_CONVEYOR_CACERT | default('/opt/rucio/etc/web/ca.crt') }} usercert = {{ RUCIO_CFG_CONVEYOR_USERCERT | default('/opt/rucio/tools/x509up') }} {% if RUCIO_CFG_CONVEYOR_CACHE_TIME is defined %}cache_time = {{ RUCIO_CFG_CONVEYOR_CACHE_TIME }}{% endif %} {% if RUCIO_CFG_CONVEYOR_USE_DETERMINISTIC_ID is defined %}use_deterministic_id = {{ RUCIO_CFG_CONVEYOR_USE_DETERMINISTIC_ID }}{% endif %} -{% if RUCIO_CFG_CONVEYOR_POLL_TIMEOUT is defined %}poll_timeout ={{ RUCIO_CFG_CONVEYOR_POLL_TIMEOUT }}{% endif %} +{% if RUCIO_CFG_CONVEYOR_POLL_TIMEOUT is defined %}poll_timeout = {{ RUCIO_CFG_CONVEYOR_POLL_TIMEOUT }}{% endif %} {% if RUCIO_CFG_CONVEYOR_SUBMIT_TIMEOUT is defined %}submit_timeout = {{ RUCIO_CFG_CONVEYOR_SUBMIT_TIMEOUT }}{% endif %} {% if RUCIO_CFG_CONVEYOR_BRING_ONLINE is defined %}bring_online = {{ RUCIO_CFG_CONVEYOR_BRING_ONLINE }}{% endif %} {% if RUCIO_CFG_CONVEYOR_QUEUE_MODE is defined %}queue_mode = {{ RUCIO_CFG_CONVEYOR_QUEUE_MODE }}{% endif %} -{% if RUCIO_CFG_CONVEYOR_USING_MEMCACHE is defined %}using_memcache = { RUCIO_CFG_CONVEYOR_USING_MEMCACHE }}{% endif %} +{% if RUCIO_CFG_CONVEYOR_USING_MEMCACHE is defined %}using_memcache = {{ RUCIO_CFG_CONVEYOR_USING_MEMCACHE }}{% endif %} {% if RUCIO_CFG_CONVEYOR_FTSMONHOSTS is defined %}ftsmonhosts = {{ RUCIO_CFG_CONVEYOR_FTSMONHOSTS }}{% endif %} {% if RUCIO_CFG_CONVEYOR_USER_ACTIVITIES is defined %}user_activities = {{ RUCIO_CFG_CONVEYOR_USER_ACTIVITIES }}{% endif %} {% if RUCIO_CFG_CONVEYOR_USER_TRANSFERS is defined %}user_transfers = {{ RUCIO_CFG_CONVEYOR_USER_TRANSFERS }}{% endif %} diff --git a/fts-cron/renew_fts_proxy_atlas.sh.j2 b/fts-cron/renew_fts_proxy_atlas.sh.j2 index 479ffa5..2eb79ac 100755 --- a/fts-cron/renew_fts_proxy_atlas.sh.j2 +++ b/fts-cron/renew_fts_proxy_atlas.sh.j2 @@ -1,25 +1,17 @@ #!/bin/bash # We have to copy the certificates because we cannot change permissions on them as mounted secrets and voms-proxy is particular about permissions -cp /opt/rucio/certs/long.proxy /tmp/long.proxy +cp /opt/rucio/certs/{{ RUCIO_LONG_PROXY }} /tmp/long.proxy chmod 400 /tmp/long.proxy # Generate a proxy with the voms extension if requested voms-proxy-init --debug -valid 96:00 -cert /tmp/long.proxy -out /tmp/x509up {% if RUCIO_FTS_VOMS is defined -%}-voms {{ RUCIO_FTS_VOMS }}{%- endif %} -rfc -n -# Delegate the proxy to the requested servers -{% if RUCIO_FTS_SERVERS is defined %} -{% set ftses = RUCIO_FTS_SERVERS.split(',') %} -{% for fts in ftses %} -fts-rest-delegate -v -f -H 96 --key=/tmp/x509up --cert=/tmp/x509up -s {{ fts }} -{% endfor %} -{% endif %} - # Create the corresponding kubernetes secrets if asked {% if RUCIO_FTS_SECRETS is defined %} {% set secrets = RUCIO_FTS_SECRETS.split(',') %} {% for secret in secrets %} -kubectl create secret generic {{ secret }} --from-file=/tmp/x509up --dry-run -o yaml | kubectl {% if RUCIO_KUBECONFIG is defined -%}--kubeconfig {{ RUCIO_KUBECONFIG }}{%- endif %} apply --validate=false -f - +kubectl create secret generic {{ secret }} --from-file=/tmp/x509up --dry-run -o yaml | kubectl apply --validate=false -f - {% endfor %} {% endif %}