[Why] 1) 'ip' -> 'direct_ips' : Cluster test script need to known direct-ip not ip. ip comes from node by command $(hostname -I | cut -d' ' -f1), it's not a direct-ip. 2) 'server' -> 'direct_server_ips' : Cluster test script uses variables 'direct_server_ips' or 'server' to connect daemon node, i perfer to 'direct_server_ips'
example: iperf test: ```shell ... [ -n "$direct_server_ips" ] && server=$direct_server_ips [ -z "$server" ] && server=127.0.0.1 server=${server%% *}
client_cmd="iperf3 -t $runtime -J -c $server $opt_udp" ... ```
Signed-off-by: Ren Wen 15991987063@163.com --- src/lib/sched.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/sched.cr b/src/lib/sched.cr index c32091f..ced0276 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -98,13 +98,13 @@ class Sched return cluster_state when "write_state" node_roles = env.params.query["node_roles"] - node_ip = env.params.query["ip"] + node_ip = env.params.query["direct_ips"] update_cluster_state(cluster_id, job_id, "roles", node_roles) update_cluster_state(cluster_id, job_id, "ip", node_ip) when "roles_ip" role = "server" server_ip = get_ip(cluster_id, role) - return "server=#{server_ip}" + return "direct_server_ips=#{server_ip}" end
# show cluster state