File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
cookbooks/aws-parallelcluster-environment/files/default/network_interfaces Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 88
99set -e
1010
11- # commented out inputs that are not required and don't exist for efa-only interfaces
1211if
1312 [ -z " ${DEVICE_NUMBER} " ] || # index of the device
1413 [ -z " ${NETWORK_CARD_INDEX} " ] || # index of the network card
2120fi
2221
2322# Check if this is an EFA-only interface (no device name or IP)
24- if [ -z " ${DEVICE_NAME} " ] || [ -z " ${DEVICE_IP_ADDRESS} " ]; then
23+ if [ -z " ${DEVICE_NAME} " ] && [ -z " ${DEVICE_IP_ADDRESS} " ]; then
2524 echo " EFA-only interface detected - skipping IP configuration"
2625 exit 0
2726fi
2827
28+ # If one of these is missing but not both, it is an invalid configuration
29+ if [ -z " ${DEVICE_NAME} " ] || [ -z " ${DEVICE_IP_ADDRESS} " ]; then
30+ echo " One or more environment variables missing"
31+ exit 1
32+ fi
33+
2934SUFFIX=$NETWORK_CARD_INDEX $( printf " %02d" $DEVICE_NUMBER )
3035
3136ROUTE_TABLE=" $(( $SUFFIX + 1000 )) "
You can’t perform that action at this time.
0 commit comments