I don't know exactly what the full scheme is, so I'll give an example where the 
values can be derived from the name:

(assuming nodes are 72 in the bottom 36u and you want u to flow rack to rack):
subtract 5001, then divide by 2 since they are two nodes per u, take the 
remainder when divided by 36 to indicate how for into the current chunk of 36 
it is, add 1 to change from 0-35 to 1-36.
[root@mgt ~]# nodegrpch testg nodepos.u='|((($1-5001)/2)%36+1)|'
[root@mgt ~]# nodels qnode5001-qnode5005 nodepos.u
qnode5001: 1
qnode5002: 1
qnode5003: 2
qnode5004: 2
qnode5005: 3


I don't know what your scheme for rack is, but, let's say for example that you 
have 72 nodes per rack and you are incrementing in a straightforward way and 
w22 is the first rack in this batch, w23 is the second, etc.

(w followed by the number 22 plus which chunk of 72 nodes the number indicates):
[root@mgt ~]# nodegrpch testg nodepos.rack='|w(22+($1-5001)/72)|'
[root@mgt ~]# nodels qnode5001,qnode5072,qnode5073,qnode5144,qnode5145  
nodepos.rack
qnode5001: w22
qnode5072: w22
qnode5073: w23
qnode5144: w23
qnode5145: w24

You can nodech or  nodegrpch.  nodegrpch would mean that future nodes in that 
group would default to follow the same scheme going forward.


From: Damir Krstic [mailto:[email protected]]
Sent: Friday, July 10, 2015 10:00 AM
To: xCAT Users Mailing list
Subject: [xcat-user] best way to populate nodepos table

As of today we are not using nodepos table for anything. I started 
experimenting and while adding nodepos.rack, nodepos.chassis, and 
nodepos.height values are easy to add using nodech command, things that are 
different between nodes are not that easy to enter without a lot of manual data 
entry.

My table currently looks like this:


#node,rack,u,chassis,slot,room,height,comments,disable

"qnode5001","w22","1","qfpc01","left",,"1u",,

"qnode5002","w22","1","qfpc01","right",,"1u",,

"qnode5003","w22","2","qfpc01","left",,"1u",,

"qnode5004","w22","2","qfpc01","right",,"1u",,



w22 is the floor position of the rack, slot is u 1 in the rack and left or 
right indicates where in the chassis node resides.

Is there any way to automate slot and u position using nodech command? Also, 
under comments in this table I would like to read-in rinv serial number command 
but I am unsure how to do that.

Any help would be greatly appreciated.

Thanks,

Damir
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to