From 21f2d53a70dbf6ae04db07e163f4485e3af47478 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Thu, 20 Aug 2015 11:34:17 -0400 Subject: [PATCH] Improve compute node setup script. closes #6942 --- doc/install/install-compute-node.html.textile.liquid | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/install/install-compute-node.html.textile.liquid b/doc/install/install-compute-node.html.textile.liquid index afde1a8f2f..f648768867 100644 --- a/doc/install/install-compute-node.html.textile.liquid +++ b/doc/install/install-compute-node.html.textile.liquid @@ -108,7 +108,10 @@ set -e if ! test -f /root/node.json ; then python - <<EOF import arvados, json, socket -node = arvados.api('v1').nodes().create(body={'hostname': socket.gethostname()}).execute() +fqdn = socket.getfqdn() +hostname, _, domain = fqdn.partition('.') +ip_address = socket.gethostbyname(socket.gethostname()) +node = arvados.api('v1').nodes().create(body={'hostname': hostname, 'domain': domain, 'ip_address': ip_address}).execute() with open('/root/node.json', 'w') as node_file: json.dump(node, node_file, indent=2) EOF @@ -121,7 +124,7 @@ UUID=`grep \"uuid\" /root/node.json |cut -f4 -d\"` PING_SECRET=`grep \"ping_secret\" /root/node.json |cut -f4 -d\"` if ! test -f /etc/cron.d/node_ping ; then - echo "*/5 * * * * root /usr/bin/curl -k -d ping_secret=$PING_SECRET https://api/arvados/v1/nodes/$UUID/ping" > /etc/cron.d/node_ping + echo "*/5 * * * * root /usr/bin/curl -k -d ping_secret=$PING_SECRET https://$ARVADOS_API_HOST/arvados/v1/nodes/$UUID/ping" > /etc/cron.d/node_ping fi /usr/bin/curl -k -d ping_secret=$PING_SECRET https://api/arvados/v1/nodes/$UUID/ping?ping_secret=$PING_SECRET -- 2.30.2