Skip to content

Commit 3057b84

Browse files
committed
gen_topo scripts: on error, print the last stderr message first
1 parent fbb2b9f commit 3057b84

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

DATA/tools/epn/gen_topo.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,3 @@ else
6060
fi
6161
# Run stage 2 of GenTopo, which does the PDP part, still from hardcoded updatable RPM path
6262
/opt/alisw/el9/GenTopo/bin/gen_topo_o2dpg.sh
63-
if [ $? != 0 ]; then
64-
echo topology generation failed 1>&2
65-
exit 1
66-
fi

DATA/tools/epn/gen_topo_logged.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ if [[ ! -z $GEN_TOPO_LOGDATE ]]; then
2626
while read STDERRLINE; do
2727
echo "$GEN_TOPO_LOGDATE $ECS_ENVIRONMENT_ID : $STDERRLINE" >> /var/log/topology/gen-topo.log
2828
done < $STDERRFILE
29+
echo "FATAL $(tail -n 1 $STDERRFILE)" 1>&2
30+
echo -e "\n - full stderr output:" 1>&2
2931
fi
3032
fi
3133

DATA/tools/epn/gen_topo_o2dpg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ if [[ ! -z "$GEN_TOPO_ODC_EPN_TOPO_POST_CACHING_CMD" ]] && [[ "0$WORKFLOWMODE" !
134134
fi
135135
TMP_POST_CACHING_CMD+=" -o $GEN_TOPO_WORKDIR/output.xml.new $GEN_TOPO_WORKDIR/output.xml"
136136
echo "Running post-caching topo-merger command: $TMP_POST_CACHING_CMD" 1>&2
137-
eval $TMP_POST_CACHING_CMD 1>&2 || { echo Error during EPN topology-merger resource allocation 1>&2; exit 1; }
137+
eval $TMP_POST_CACHING_CMD 1>&2 || { echo Error during EPN resource allocation 1>&2; exit 1; }
138138
mv -f $GEN_TOPO_WORKDIR/output.xml.new $GEN_TOPO_WORKDIR/output.xml 1>&2
139139
fi
140140

0 commit comments

Comments
 (0)