Return all ips of cluster nodes, not direct ips only. Only for one role now.
Example: direct_server_ip=<direct ip> server=<public ip>
Signed-off-by: Ren Wen 15991987063@163.com --- src/scheduler/request_cluster_state.cr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/scheduler/request_cluster_state.cr b/src/scheduler/request_cluster_state.cr index 79a13cc..1782797 100644 --- a/src/scheduler/request_cluster_state.cr +++ b/src/scheduler/request_cluster_state.cr @@ -58,7 +58,9 @@ class Sched cluster_state.each_value do |host_state| roles = host_state["roles"] direct_ips = host_state["direct_ips"] - roles_ip << "#{roles}=#{direct_ips}" + node_ip = host_state["ip"] + roles_ip << "direct_#{roles}_ips=#{direct_ips}" + roles_ip << "#{roles}=#{node_ip}" end
return roles_ip.join('\n')