Debug mode for topology generation#1460
Conversation
|
This makes sense to me.
|
|
These points I wanted to add to the So I have at the moment in the if [[ $TOPO == 1 ]]; then
TOPO_LOG=$(ssh epnlog@$INFRANODE grep $PARTITION /var/log/topology/gen-topo.log)
if [[ -z $TOPO_LOG ]]; then
echo "No topology logs found for: partition=$PARTITION and role=$ROLENAME"
echo "Typo in partition ID or looking in staging instead of production or vice versa?"
exit 1
fi
echo "$TOPO_LOG"
TOPO_COMMAND=$(grep -o 'GEN_TOPO_HASH.*\/opt\/alisw\/el8\/GenTopo\/bin' <<< "$TOPO_LOG")
TOPO_COMMAND+="/gen_topo.sh"
echo -e "\n\033[0;31mIn order to debug the topology generation, run the following:\033[0m\n"
echo "DEBUG_TOPO_GENERATION=1 GEN_TOPO_WORKDIR=\$PWD $TOPO_COMMAND"
echo -e "\n\033[0;31mIn case you want to print the workflow, prepend the following:\033[0m\n"
echo "WORKFLOWMODE=print EPN2EOS_METAFILES_DIR=FOO"
echo
exit 0
fiWhich would print for example |
|
Hi @davidrohr could you check again if it makes sense for you like this? I have also added a separate directory for the topology cache on staging |
Only that there is this long-pending JIRA ticket https://its.cern.ch/jira/browse/EPN-436, to move the gen_topo temp folder of the scratch NFS, as requested by EPN. But up to them to do this, so long I am fine with your change. Afterwards one needs to think again. |
|
Also, in principle it is no problem if they use the same temp-folder, since I use a file-lock to serialize the access. It just means the topology cache uses the same folder, but since the cache is verified against all set env variables, this cannot be confused. Anyhow, a bit cleaner to separate it, so just go ahead. |
|
Thanks! Then pinging @lkrcal here as well for the temp folder on the infra nodes for the cache. And for now I merge this as is |
This would allow to run the
epn-topo-mergerwith the option--force-exact-node-numbers --nodes-mi50 1 --nmin-mi50 0 --nodes-mi100 1 --nmin-mi100 0in case the user specifiesDEBUG_TOPOLOGY_GENERATION=1. In that case also the temporary xml file would be kept for inspection.Ping @davidrohr to see if its fine with you?