From 49e98b230cc142c9fc0f34afdf25b0230ddffb06 Mon Sep 17 00:00:00 2001 From: solin319 Date: Mon, 23 Apr 2018 09:20:06 +0800 Subject: [PATCH] Support worker/server nodes use cluster ip Use 0.0.0.0 to bind all nodes' listening port. This can make all nodes use cluster ip in kubernetes. We can set DMLC_NODE_HOST and DMLC_PS_ROOT_URI with cluster ip when use kubernetes to launch distribute jobs. --- src/zmq_van.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zmq_van.h b/src/zmq_van.h index cd023278..89289058 100644 --- a/src/zmq_van.h +++ b/src/zmq_van.h @@ -69,7 +69,7 @@ class ZMQVan : public Van { int local = GetEnv("DMLC_LOCAL", 0); std::string hostname = node.hostname.empty() ? "*" : node.hostname; int use_kubernetes = GetEnv("DMLC_USE_KUBERNETES", 0); - if (use_kubernetes > 0 && node.role == Node::SCHEDULER) { + if (use_kubernetes > 0) { hostname = "0.0.0.0"; } std::string addr = local ? "ipc:///tmp/" : "tcp://" + hostname + ":";