diff options
Diffstat (limited to 'jjb/scripts/setup_executor_env.sh')
-rwxr-xr-x | jjb/scripts/setup_executor_env.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/jjb/scripts/setup_executor_env.sh b/jjb/scripts/setup_executor_env.sh index 4d3cb6ec..72782490 100755 --- a/jjb/scripts/setup_executor_env.sh +++ b/jjb/scripts/setup_executor_env.sh @@ -25,12 +25,22 @@ file_delimiter="----- %< -----" long_line="************************************************************************" downloads_cache="/root/Downloads" +# Requires all nomad client machines to run the following command +# and mount /scratch/nomad into the docker container: +# sudo mkdir -p /scratch/nomad && echo "$(hostname)-$(uname -m)" | sudo tee /scratch/nomad/nomad-client +nomad_client_file="/scratch/nomad/nomad-client" +if [ -f "$nomad_client_file" ] ; then + NOMAD_CLIENT="$(cat $nomad_client_file)" +else + NOMAD_CLIENT="Unknown" +fi + # Node info echo "$long_line" echo "Executor Runtime Attributes:" echo "OS: $OS_ID-$OS_VERSION_ID" echo "Arch: $OS_ARCH" -echo "Nomad Hostname: $(grep search /etc/resolv.conf | cut -d' ' -f2 | head -1)" +echo "Nomad Client Hostname: $NOMAD_CLIENT" echo "Container ID: $(hostname)" echo "$long_line" |