The minidesign of providing a command to generate the predict nicname for RHEL7
Background
Traditionally, network interfaces in Linux are enumerated as eth[0123…], but these names do not necessarily correspond to actual labels on the chassis. customer need a methods to get consistent and predictable network device name before provision or network configuration.
xCAT plans to provide a tool or solution to help customer to get a consistent and predictable network device name before provision or network configuration.
Limitation
-
Up to now, we just know RHELs 7 support this technology, we are not sure it could be used for SLES and Ubunut, we do it for rhels7 first and keep investigation for the rest platforms.
-
Due to using genesis, so when using
getadapters
command, it will result in target node reboot.
Planning Outputs
- User interface:
1). getadapters --> a new xcat command coded by perl
usage : getadapters <noderange> [-f]
-h Display usage message.
-f Force to rerun the whole network adapter's information scanning process,
not get information from DB already existed.
Output :
node1:1:hitname=enp6s0f0|mac=3440b5b95c9e|pci=/pci0000:00/0000:00:1c.0/0000:06:00.0|candidatename=eno1,enp6s0f0,enx3440b5b95c9e
node1:2:hitname=enp6s0f1|mac=3440b5b98b58|pci=/pci0000:00/0000:00:1c.0/0000:06:00.1|candidatename=enp6s0f1,enx3440b5b98b58
node1:3:hitname=enp0s26u1u5u5|mac=3640b5b95ca3|pci=/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.5/1-1.5.5:1.0|candidatename=enp0s26u1u5u5,enx3640b5b95ca3
node1:4:pci=20:00.0|modle=Mellanox Technologies MT27500 Family
node2:1:mac=112233445566|pci=/pci0000:00/0000:00:1c.0/0000:06:00.0|candidatename=eno1,enp6s0f0,enx112233445566
........
**[Note]**
a). getadapters will create one entry for each adapter of each node
b). Every entry starts at node name, following by a index. if a node have 4 network adapters, the index will be 1-4
c). each entry will contain such information
hitname: the consistent name which can be used by confignic directly in operating system which follow the same naming scheme with rhels7
mac: the mac address info
pci: the pci location info
candidatename: all predictable names calculated by redhat depending on each scheme. customer can use any name in this predictable name list to config their network, but one thing need to be mentioned, xCAT won't change the nic name in final running operating system. for example, like the first line of above sample output, one nic of node1 has 3 predictable names, they are eno1,enp6s0f0,enx3440b5b95c9e. you can use enp6s0f0 as attribute of 'confignic' to set ip addr. xCAT will assign the ip to the correct physical adapter, but won't set name enp6s0f0 as this adapter's final name. that means after setting ip address, this adapter maybe still be named eno1 by redhat. maybe one day xcat support customizing nic name, but now. so xCAT recommends to use the hitname.
vender: the vender of network device
model: the modle of network device
- Invisible files for user but need to implement:
1). getadapter.sh --> a new shell script located in genesis. used to scan network adapter's information
2). findadapter --> a new command issued by getadapter.sh to xcatd. this is a new command and can be handled by xcatd as common command. but this command is invisible for user.
3). getadapter.pm --> a new xcat plugin file. used to handle getadapters and findadapter commands.
4). adapters.info --> text files located under /var/lib/xcat/
. used to save network adapters information.
Code Logic and Process
getadapter.sh can be triggered by discovery process ahead. if it did, adapters<nodename>.info
existed before below steps
getadapters.pl
- collect and format user input then send to xcatd
- wait xcatd's response
- parse response and format output to STDOUT
getadapter.sh
- collect all network adapters information by
udevadm
- format a findadapter command message (XML format) which include all network adapters information
- send findadapter to xcatd
getadapter.pm
- handle getadapters command from CLI
1). check if there is ``-f`` option, if yes to step 4, if no to step 2.
2). check if there already was a ``/var/lib/xcat/adapters<nodename>.info``, if yes to step 3, if no to step 5.
3). read out the information from ``/var/lib/xcat/adapters<nodename>.info``, format a successful response include the network information. then skip to 8.
4). mv ``/var/lib/xcat/adapters<nodename>.info`` to ``/var/lib/xcat/adapters<nodename>.bak`` if ``/var/lib/xcat/adapters<nodename>.info``existed.
5). issue ``nodeset noderange runcmd="getadapter"`` to xcatd
6). check if all ``/var/lib/xcat/adapters<nodename>.info`` shows up in loop? if true, break to step 7. if false, sleep a while and check again. if 20 minutes later, there are ``/var/lib/xcat/adapters<nodename>.info`` still doesn't show up. mv these missed ``/var/lib/xcat/adapters<nodename>.bak`` back to ``/var/lib/xcat/adapters<nodename>.info``, then format a error response include network info already collected then skip to 8.
7). read ``/var/lib/xcat/adapters<nodename>.info``, format a successful response include the latest network info.
8). send response to xcatd.
- handle findadapter command from
getadapter.sh
1). parse request
2). extract all network adapters information then save these to ``/var/lib/xcat/adapters<nodename>.info``
Related key technology
Rhels 7 provides methods to calculate consistent network device name. udevadm
can read out all candidate name of a specific adapter. these names include very useful information, such like adapter's mac, physical address(bus+slot...). xCAT can leverage these information to give a map to customer, let customer know a specific adapter's all predictable name, mac and physical address info ::
[root@c910f04x35 ~]# ls /sys/class/net/
eno1 enp0s26u1u5u5 enp6s0f1 ib0 ib1 lo
[root@c910f04x35 ~]# udevadm info /sys/class/net/eno1 | grep ID_NET_NAME
E: ID_NET_NAME_MAC=enx3440b5b95c9e
E: ID_NET_NAME_ONBOARD=eno1
E: ID_NET_NAME_PATH=enp6s0f0
[root@c910f04x35 ~]# udevadm info /sys/class/net/enp0s26u1u5u5 | grep ID_NET_NAME
E: ID_NET_NAME_MAC=enx3640b5b95ca3
E: ID_NET_NAME_PATH=enp0s26u1u5u5
News
- Apr 22, 2016: xCAT 2.11.1 released.
- Mar 11, 2016: xCAT 2.9.3 (AIX only) released.
- Dec 11, 2015: xCAT 2.11 released.
- Nov 11, 2015: xCAT 2.9.2 (AIX only) released.
- Jul 30, 2015: xCAT 2.10 released.
- Jul 30, 2015: xCAT migrates from sourceforge to github
- Jun 26, 2015: xCAT 2.7.9 released.
- Mar 20, 2015: xCAT 2.9.1 released.
- Dec 12, 2014: xCAT 2.9 released.
- Sep 5, 2014: xCAT 2.8.5 released.
- May 23, 2014: xCAT 2.8.4 released.
- Jan 24, 2014: xCAT 2.7.8 released.
- Nov 15, 2013: xCAT 2.8.3 released.
- Jun 26, 2013: xCAT 2.8.2 released.
- May 17, 2013: xCAT 2.7.7 released.
- May 10, 2013: xCAT 2.8.1 released.
- Feb 28, 2013: xCAT 2.8 released.
- Nov 30, 2012: xCAT 2.7.6 released.
- Oct 29, 2012: xCAT 2.7.5 released.
- Aug 27, 2012: xCAT 2.7.4 released.
- Jun 22, 2012: xCAT 2.7.3 released.
- May 25, 2012: xCAT 2.7.2 released.
- Apr 20, 2012: xCAT 2.7.1 released.
- Mar 19, 2012: xCAT 2.7 released.
- Mar 15, 2012: xCAT 2.6.11 released.
- Jan 23, 2012: xCAT 2.6.10 released.
- Nov 15, 2011: xCAT 2.6.9 released.
- Sep 30, 2011: xCAT 2.6.8 released.
- Aug 26, 2011: xCAT 2.6.6 released.
- May 20, 2011: xCAT 2.6 released.
- Feb 14, 2011: Watson plays on Jeopardy and is managed by xCAT!
- xCAT Release Notes Summary
- xCAT OS And Hw Support Matrix
- xCAT Test Environment Summary
History
- Oct 22, 2010: xCAT 2.5 released.
- Apr 30, 2010: xCAT 2.4 is released.
- Oct 31, 2009: xCAT 2.3 released.
xCAT's 10 year anniversary! - Apr 16, 2009: xCAT 2.2 released.
- Oct 31, 2008: xCAT 2.1 released.
- Sep 12, 2008: Support for xCAT 2
can now be purchased! - June 9, 2008: xCAT breaths life into
(at the time) the fastest
supercomputer on the planet - May 30, 2008: xCAT 2.0 for Linux
officially released! - Oct 31, 2007: IBM open sources
xCAT 2.0 to allow collaboration
among all of the xCAT users. - Oct 31, 1999: xCAT 1.0 is born!
xCAT started out as a project in
IBM developed by Egan Ford. It
was quickly adopted by customers
and IBM manufacturing sites to
rapidly deploy clusters.