[Why] Nodes need to communicate with each other when testing cluster jobs. After adding 2 fileds: 'direct_macs' and 'direct_ips', can bind ips to macs.
[HowTo] When you test a cluster job, need to config cluster file correctly. Below is the template: ```yaml <hostname>: roles: [ <"server">, ... ] macs: [ <mac>, ... ] ips: [ <ip>, ... ]
<hostname>: roles: [ <"client">, ... ] macs: [ <mac>, ... ] ips: [ <ip>, ... ] ``` For 'ips': 1) should be the intranet IP 2) all ips in cluster file should be in the same network segment 3) subnet mask is 24. [InFuture] Set default ips when there's no ips in cluster file or only one host has ips.
Signed-off-by: Ren Wen 15991987063@163.com --- src/lib/sched.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/sched.cr b/src/lib/sched.cr index 7215df5..a26091b 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -219,7 +219,8 @@ class Sched job["testbox"] = tbox_group job.update_tbox_group(tbox_group) job["node_roles"] = config["roles"].as_a.join(" ") - job["node_macs"] = config["macs"].as_a.join(" ") + job["direct_macs"] = config["macs"].as_a.join(" ") + job["direct_ips"] = config["ips"].as_a.join(" ")
response = add_job(job, job_id) message = (response["error"]? ? response["error"]["root_cause"] : "")
Reviewed-by: Wang Chenglong 18509160991@163.com
On Wed, Oct 21, 2020 at 08:06:53PM +0800, Ren Wen wrote:
[Why] Nodes need to communicate with each other when testing cluster jobs. After adding 2 fileds: 'direct_macs' and 'direct_ips', can bind ips to macs.
[HowTo] When you test a cluster job, need to config cluster file correctly. Below is the template:
<hostname>: roles: [ <"server">, ... ] macs: [ <mac>, ... ] ips: [ <ip>, ... ] <hostname>: roles: [ <"client">, ... ] macs: [ <mac>, ... ] ips: [ <ip>, ... ]
For 'ips': 1) should be the intranet IP 2) all ips in cluster file should be in the same network segment 3) subnet mask is 24. [InFuture] Set default ips when there's no ips in cluster file or only one host has ips.
Signed-off-by: Ren Wen 15991987063@163.com
src/lib/sched.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/sched.cr b/src/lib/sched.cr index 7215df5..a26091b 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -219,7 +219,8 @@ class Sched job["testbox"] = tbox_group job.update_tbox_group(tbox_group) job["node_roles"] = config["roles"].as_a.join(" ")
job["node_macs"] = config["macs"].as_a.join(" ")
job["direct_macs"] = config["macs"].as_a.join(" ")
job["direct_ips"] = config["ips"].as_a.join(" ") response = add_job(job, job_id) message = (response["error"]? ? response["error"]["root_cause"] : "")
-- 2.23.0
On Wed, Oct 21, 2020 at 08:06:53PM +0800, Ren Wen wrote:
[Why] Nodes need to communicate with each other when testing cluster jobs. After adding 2 fileds: 'direct_macs' and 'direct_ips', can bind ips to macs.
[HowTo] When you test a cluster job, need to config cluster file correctly. Below is the template:
<hostname>: roles: [ <"server">, ... ] macs: [ <mac>, ... ] ips: [ <ip>, ... ] <hostname>: roles: [ <"client">, ... ] macs: [ <mac>, ... ] ips: [ <ip>, ... ]
For 'ips': 1) should be the intranet IP
Does the ips is come from 'ifconfig'? when our physical machine restart the intranet IP maybe randsom allocation? so should we may consider to bind a fixed ip for physical machine.
Thanks, Zhangyu
2) all ips in cluster file should be in the same network segment 3) subnet mask is 24.
[InFuture] Set default ips when there's no ips in cluster file or only one host has ips.
On Thu, Oct 22, 2020 at 07:20:41PM +0800, Zhang Yu wrote:
On Wed, Oct 21, 2020 at 08:06:53PM +0800, Ren Wen wrote:
[Why] Nodes need to communicate with each other when testing cluster jobs. After adding 2 fileds: 'direct_macs' and 'direct_ips', can bind ips to macs.
[HowTo] When you test a cluster job, need to config cluster file correctly. Below is the template:
<hostname>: roles: [ <"server">, ... ] macs: [ <mac>, ... ] ips: [ <ip>, ... ] <hostname>: roles: [ <"client">, ... ] macs: [ <mac>, ... ] ips: [ <ip>, ... ]
For 'ips': 1) should be the intranet IP
Does the ips is come from 'ifconfig'? when our physical machine restart
No, ip is set by scheduler.
the intranet IP maybe randsom allocation? so should we may consider to
Yes, this will set by cluster config file.
bind a fixed ip for physical machine.
Yes, should bind one (according to the number of macs).
Thanks, RenWen
Thanks, Zhangyu
2) all ips in cluster file should be in the same network segment 3) subnet mask is 24.
[InFuture] Set default ips when there's no ips in cluster file or only one host has ips.
On Wed, Oct 21, 2020 at 08:06:53PM +0800, Ren Wen wrote:
[Why] Nodes need to communicate with each other when testing cluster jobs. After adding 2 fileds: 'direct_macs' and 'direct_ips', can bind ips to macs.
[HowTo] When you test a cluster job, need to config cluster file correctly. Below is the template:
<hostname>: roles: [ <"server">, ... ] macs: [ <mac>, ... ] ips: [ <ip>, ... ] <hostname>: roles: [ <"client">, ... ] macs: [ <mac>, ... ] ips: [ <ip>, ... ]
For 'ips': 1) should be the intranet IP 2) all ips in cluster file should be in the same network segment 3) subnet mask is 24. [InFuture] Set default ips when there's no ips in cluster file or only one host has ips.
Signed-off-by: Ren Wen 15991987063@163.com
src/lib/sched.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/sched.cr b/src/lib/sched.cr index 7215df5..a26091b 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -219,7 +219,8 @@ class Sched job["testbox"] = tbox_group job.update_tbox_group(tbox_group) job["node_roles"] = config["roles"].as_a.join(" ")
job["node_macs"] = config["macs"].as_a.join(" ")
job["direct_macs"] = config["macs"].as_a.join(" ")
job["direct_ips"] = config["ips"].as_a.join(" ")
This ip is ont fixed. Thanks, Baijing
response = add_job(job, job_id) message = (response["error"]? ? response["error"]["root_cause"] : "")
-- 2.23.0