summaryrefslogtreecommitdiffstats
path: root/container-disc
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@verizonmedia.com>2021-08-18 14:33:08 +0200
committerArnstein Ressem <aressem@verizonmedia.com>2021-08-18 14:33:08 +0200
commit6a5eda8ab6642ef223192a863fa5df37ba232ad8 (patch)
tree9d8a05a46386da6671208c0756d45eea165694c5 /container-disc
parentb263204961c87de5c664be6cb3f90c45da119ba3 (diff)
Fail Vespa startup if no numactl [run-systemtest].
Diffstat (limited to 'container-disc')
-rwxr-xr-xcontainer-disc/src/main/sh/vespa-start-container-daemon.sh31
1 files changed, 14 insertions, 17 deletions
diff --git a/container-disc/src/main/sh/vespa-start-container-daemon.sh b/container-disc/src/main/sh/vespa-start-container-daemon.sh
index 223124c29d6..dcfb45c9698 100755
--- a/container-disc/src/main/sh/vespa-start-container-daemon.sh
+++ b/container-disc/src/main/sh/vespa-start-container-daemon.sh
@@ -111,25 +111,22 @@ configure_cpu() {
configure_numactl() {
log_message debug "starting ${VESPA_SERVICE_NAME} for ${VESPA_CONFIG_ID}"
- if numactl --interleave all true &> /dev/null; then
- # We are allowed to use numactl
- numnodes=$(numactl --hardware |
- grep available |
- awk '$3 == "nodes" { print $2 }')
- if [ "$VESPA_AFFINITY_CPU_SOCKET" ] &&
- [ "$numnodes" -gt 1 ]
- then
- node=$(($VESPA_AFFINITY_CPU_SOCKET % $numnodes))
- log_message debug "with affinity to $VESPA_AFFINITY_CPU_SOCKET out of $numnodes cpu sockets"
- numactlcmd="numactl --cpunodebind=$node --membind=$node"
- else
- log_message debug "with memory interleaving on all nodes"
- numactlcmd="numactl --interleave all"
- fi
+
+ # We are allowed to use numactl
+ numnodes=$(numactl --hardware |
+ grep available |
+ awk '$3 == "nodes" { print $2 }')
+ if [ "$VESPA_AFFINITY_CPU_SOCKET" ] &&
+ [ "$numnodes" -gt 1 ]
+ then
+ node=$(($VESPA_AFFINITY_CPU_SOCKET % $numnodes))
+ log_message debug "with affinity to $VESPA_AFFINITY_CPU_SOCKET out of $numnodes cpu sockets"
+ numactlcmd="numactl --cpunodebind=$node --membind=$node"
else
- log_message debug "without numactl (no permission or not available)"
- numactlcmd=""
+ log_message debug "with memory interleaving on all nodes"
+ numactlcmd="numactl --interleave all"
fi
+
log_message debug "numactlcmd: $numactlcmd"
}