Commit 887aee3e authored by Michael Davis's avatar Michael Davis
Browse files

[kill-bash] Moves setting workflow from ctaeos-mgm.sh to create_instance.sh

The workflow now includes the endpoint, which includes the Kubernetes namespace that the pod is
running in.
parent 333898c6
......@@ -179,29 +179,10 @@ test -e /usr/lib64/libjemalloc.so.1 && export LD_PRELOAD=/usr/lib64/libjemalloc.
# set interval in which the WFE engine is running
#eos space config default space.wfe.interval=1
# ATTENTION
# for sss authorisation unix has to be replaced by sss
# Set the worfklow rule for archiving files to tape
eos attr set sys.workflow.closew.default="proto/cta:ctafrontend:10955 <parent/file>" ${CTA_WF_DIR}
# Set the worflow rule for creating tape file replicas in the EOS namespace.
eos attr set sys.workflow.archived.default="proto/cta:ctafrontend:10955 <parent/file>" ${CTA_WF_DIR}
# Set the workflow rule for retrieving file from tape.
eos attr set sys.workflow.sync::prepare.default="proto/cta:ctafrontend:10955 <parent/file>" ${CTA_WF_DIR}
# Set the workflow rule for the closew event of the CTA_retrieve workflow.
# Using the CTA_retrieve workflow will prevent the default workflow from
# receiving the closew event. Triggering the default workflow in this way would
# haved causes the unwanted action of copying the disk file to tape again.
# The action of the CTA_retrieve workflow when triggered by the closew event is
# to set the CTA_retrieved_timestamp attribute.
eos attr set sys.workflow.closew.CTA_retrieve="proto/cta:ctafrontend:10955 <parent/file>" ${CTA_WF_DIR}
# configure preprod directory separately
/opt/run/bin/eos_configure_preprod.sh
echo "### ctaeos mgm ready ###"
/bin/bash
......@@ -297,6 +297,21 @@ kubectl --namespace=${instance} logs ctaeos | grep -q "### ctaeos mgm ready ###
echo OK
# Set the workflow rules for archiving, creating tape file replicas in the EOS namespace, retrieving
# files from tape and deleting files.
#
# The closew.CTA_retrieve workflow prevents the default workflow from receiving the closew event, as
# we don't want to trigger the action of copying the retrived disk file to tape again. The
# closew.CTA_retrieve workflow sets the CTA_retrieved_timestamp attribute.
echo "Setting workflows in namespace ${instance} pod ctaeos:"
CTA_ENDPOINT=ctafrontend.${instance}.svc.cluster.local:10955
for WORKFLOW in closew.default archived.default sync::prepare.default closew.CTA_retrieve sync::delete.default
do
echo "eos attr set sys.workflow.${WORKFLOW}=\"proto/cta:${CTA_ENDPOINT} <parent/file>\" ${CTA_WF_DIR}"
kubectl --namespace=${instance} exec ctaeos -- bash -c "eos attr set sys.workflow.${WORKFLOW}=\"proto/cta:${CTA_ENDPOINT} <parent/file>\" ${CTA_WF_DIR}"
done
echo -n "Copying eos SSS on ctacli and client pods to allow recalls"
kubectl --namespace=${instance} exec ctaeos cat /etc/eos.keytab | kubectl --namespace=${instance} exec -i ctacli -- bash -c "cat > /etc/eos.keytab; chmod 600 /etc/eos.keytab"
kubectl --namespace=${instance} exec ctaeos cat /etc/eos.keytab | kubectl --namespace=${instance} exec -i client -- bash -c "cat > /etc/eos.keytab; chmod 600 /etc/eos.keytab"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment