Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-vo fts cron fixes #226

Closed
wants to merge 3 commits into from
Closed

Conversation

gmatthews20
Copy link
Contributor

Changes made to multi-vo script suggested here rucio/helm-charts#126 :

  • Replaced voms with vo
  • Use vo specific voms variable
  • Make voms extension optional

Copy link

@Thysk Thysk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I give these suggestions now, as if secrets can be mounted in a VO specific directory as they are with this cron-job, then that means all files within secrets can have an explicit name , and the secret is created as it currently is {secret}-{vo}, but internally they are all file name wise, identical

voms-proxy-init2 -valid 24:00 -cert /tmp/{{ voms }}/long.proxy -key /tmp/{{ voms }}/long.proxy -out /tmp/x509up_{{ voms }} -voms {{ voms }} -rfc -timeout 5
if [ $RUCIO_FTS_VOMS_{{ vo | upper }} ]
then
voms-proxy-init2 -valid 24:00 -cert /tmp/{{ vo }}/long.proxy -key /tmp/{{ vo }}/long.proxy -out /tmp/x509up_{{ vo }} -rfc -timeout 5 -voms $RUCIO_FTS_VOMS_{{ vo | upper }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps the outputs here should also be to the VO directory, and then use a generic name for the output, but organised by the directories, rather than prescribing the naming of the files?

Copy link
Contributor Author

@gmatthews20 gmatthews20 Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, it makes it a bit easier to understand and more consistent

then
voms-proxy-init2 -valid 24:00 -cert /tmp/{{ vo }}/long.proxy -key /tmp/{{ vo }}/long.proxy -out /tmp/x509up_{{ vo }} -rfc -timeout 5 -voms $RUCIO_FTS_VOMS_{{ vo | upper }}
else
voms-proxy-init2 -valid 24:00 -cert /tmp/{{ vo }}/long.proxy -key /tmp/{{ vo }}/long.proxy -out /tmp/x509up_{{ vo }} -rfc -timeout 5
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above


# 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 --hours=24 --force --key=/tmp/x509up_{{ voms }} --cert=/tmp/x509up_{{ voms }} -s {{ fts }}
fts-rest-delegate --hours=24 --force --key=/tmp/x509up_{{ vo }} --cert=/tmp/x509up_{{ vo }} -s {{ fts }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change if you agree with above comments

{% 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 }}-{{ voms }} --from-file=/tmp/x509up_{{ voms }} --dry-run=client -o yaml | kubectl apply --validate=false -f -
kubectl create secret generic {{ secret }}-{{ vo }} --from-file=/tmp/x509up_{{ vo }} --dry-run=client -o yaml | kubectl apply --validate=false -f -
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change if you agree with above comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants