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