On Tue, Oct 20, 2020 at 11:27:39AM +0800, Cao Xueliang wrote:
On Tue, Oct 20, 2020 at 11:02:01AM +0800, Ren Wen wrote:
[Why] nodes need communicate with each other when running cluster jobs. after adding 2 fileds, 'direct_ips' and 'direct_macs', can bind ips to macs.
# host macs and host ips
direct_macs = config["macs"].as_a
direct_ips = [] of String
net_id = "#{ip_prefix}#{254 - job_id.hash%44}" # 192.168.<211..254>
direct_macs.size.times do
raise "more than 255 macs" if host_id > 255
You can raise this first if direct_macs.size > 255.
'direct_macs' is the info of one node, not all.
Thanks, RenWen
Thanks, Xueliang
direct_ips << "#{net_id}.#{host_id}"
host_id += 1
end
job["direct_macs"] = direct_macs.join(" ")
job["direct_ips"] = direct_ips.join(" ") response = add_job(job, job_id) message = (response["error"]? ? response["error"]["root_cause"] : "")
-- 2.23.0