diff --git a/bin/run-tests-on-swarm.sh b/bin/run-tests-on-swarm.sh index 60624b3e9..35b214bc5 100755 --- a/bin/run-tests-on-swarm.sh +++ b/bin/run-tests-on-swarm.sh @@ -339,6 +339,7 @@ else --cap-add SYSLOG --cap-add SYS_PTRACE --cap-add SYS_ADMIN --cap-add SYS_NICE \ ${SERVICE_EXTRA_ARGS[@]+"${SERVICE_EXTRA_ARGS[@]}"} \ --name "$SERVICE" --env NODE_SERVER_OPTS="-c $TESTRUNNER.$NETWORK:27183" \ + --env 'PARENT_NODE_NAME={{.Node.Hostname}}' \ $ENV_OPTS $BINDMOUNT_OPTS --network "$NETWORK" --detach "$DOCKERIMAGE" &> /dev/null; then log_error "Could not create service $SERVICE. Exiting."; docker_cleanup; exit 1 fi diff --git a/lib/node_server.rb b/lib/node_server.rb index 83b0da945..4edd71fea 100755 --- a/lib/node_server.rb +++ b/lib/node_server.rb @@ -29,11 +29,13 @@ class NodeServer attr_accessor :testcase, :addr_configserver, :hostname, :port_configserver_rpc, :configserver_started attr_reader :tls_env attr_reader :https_client + attr_reader :parent_node_name def initialize(hostname, short_hostname) @services = [] # must keep list of service objects created to prevent gc @hostname = hostname @short_hostname = short_hostname + @parent_node_name = ENV['PARENT_NODE_NAME'] @monitoring = false @monitor_thread = nil @http_servers = {} diff --git a/lib/node_server_interface.rb b/lib/node_server_interface.rb index 49e0dde93..08ef491f1 100644 --- a/lib/node_server_interface.rb +++ b/lib/node_server_interface.rb @@ -193,6 +193,10 @@ def hostname @node_server.hostname end + def parent_node_name + @node_server.parent_node_name + end + def port_configserver_rpc @node_server.port_configserver_rpc end diff --git a/lib/testcase.rb b/lib/testcase.rb index 40de31508..25743859e 100644 --- a/lib/testcase.rb +++ b/lib/testcase.rb @@ -266,6 +266,10 @@ def runmethod(test_method, real_test_method, test_results) end output("Timeout length (test_method: " + test_method.to_s + "): " + timeout_length.to_s) + vespa.nodeproxies.each do |hostname, node| + parent_node_name = node.parent_node_name + output("Host \"#{hostname}\" (parent \"#{parent_node_name}\")") + end __send__(real_test_method) end check_performance(test_method) if performance?