Changing Hostname in xCAT 2.14

All activities to be triggered from Master Node 1

Step 1:

# ssh nodename

Step 2:

# /etc/sysconfig/network | Add HOSTNAME=newnodename						
# /etc/hostname | Add newnodename

exit

Step 3:
Remove Old Provision Environment

# makedns -d nodename /*Remove the nodes from DNS configuration*/
# makedhcp -d nodename /*Remove the nodes from the DHCP configuration*/

Step 4:
Change Definition

# chdef -t node -o oldnodename -n newnodename /*Change the hostname in the xCAT database*/
# chdef -t node -o newnodename bmc=oldbmcname /*Re add the bmc name in the xCAT database*/

Step 5:
Change the hostname and IP address in the /etc/hosts file

# makehosts newnodename

Step 6:

# makedns -n /*Configure the new names in DNS*/
# makedhcp -a /*Configure the new names in DHCP*/
# makeconfluentcfg /*Update Console Server*/

Step 7:
Reboot Updated Server

Step 8:
After you repeat Step – 1 to Step – 7 for all nodes On the primary management node.
Run

# pscp /etc/hosts all:/etc/

to copy the hosts file to all the nodes except the new node, because the new node need password authentication at this point.

Error when installing xCAT 2.8.2

If you have error such as those below,

Error: Package: xCAT-2.8.2-snap201307222333.x86_64 (xcat-2-core)
Requires: conserver-xcat
Error: Package: xCAT-2.8.2-snap201307222333.x86_64 (xcat-2-core)
Requires: syslinux-xcat
Error: Package: xCAT-2.8.2-snap201307222333.x86_64 (xcat-2-core)
Requires: elilo-xcat
Error: Package: xCAT-2.8.2-snap201307222333.x86_64 (xcat-2-core)
Requires: ipmitool-xcat >= 1.8.9
Error: Package: 1:xCAT-genesis-scripts-x86_64-2.8.2-snap201307222333.noarch (xcat-2-core)
Requires: xCAT-genesis-base-x86_64
Error: Package: xCAT-2.8.2-snap201307222333.x86_64 (xcat-2-core)
Requires: xnba-undi

Go to http://sourceforge.net/projects/xcat/files/yum/xcat-dep/rh6/x86_64/ and find the respective rpms that fit the package name

 

 

 

Dependency issues when installing xCAT 2.7 on CentOS 6

If you are using the yum install for xCAT 2.7 on CentOS 6, you will need the .repo and putting in /etc/yum.repos.d/

# wget http://sourceforge.net/projects/xcat/files/yum/stable/xcat-core/xCAT-core.repo
# wget http://sourceforge.net/projects/xcat/files/yum/xcat-dep/rh6/x86_64/xCAT-dep.repo

Do a yum check-update

# yum check-update

Do a yum install of xCAT ie

# yum install xCAT

You might get the error

Error: Package: xCAT-2.7.2-snap201205230215.x86_64 (xcat-2-core)
           Requires: elilo-xcat
Error: Package: xCAT-2.7.2-snap201205230215.x86_64 (xcat-2-core)
           Requires: xCAT-genesis-x86_64

You will notice you will have these error. To rectify, you have to download the from http://sourceforge.net/projects/xcat/files/yum/xcat-dep/rh6/x86_64/ and do a rpm install

# rpm -Uvh xCAT-genesis-x86_64-2.7.......
# rpm -Uvh elilo-xcat-3.14-4.noarch.rpm

Finally do a yum install xCAT and you should be able to install without issue.

Using xCAT contributed scripts

This is a continuation of blog entry User Contributed Script ported from xcat 1.x to xcat 2.x

Step 1: Placing addclusteruser in /opt/xcat/sbin

# cd /opt/xcat/sbin
# wget https://xcat.svn.sourceforge.net/svnroot/xcat/xcat-contrib/admin_patch/
xCAT-2-admin_patch-1.1/addclusteruser

Step 2: Placing gensshkeys in /opt/xcat/sbin

# cd /opt/xcat/sbin
# wget https://xcat.svn.sourceforge.net/svnroot/xcat/xcat-contrib/admin_patch/
xCAT-2-admin_patch-1.1/gensshkeys

Step 3: Placing shfunctions1 in /opt/xcat/lib

#  cd /opt/xcat/lib
# wget https://xcat.svn.sourceforge.net/svnroot/xcat/xcat-contrib/admin_patch/
xCAT-2-admin_patch-1.1/shfunctions1

To add users using addclusteruser

# addclusteruser
......

I’m assuming you have exported the home directory to other nodes

# pscp /etc/passwd compute:/etc/
# pscp /etc/shadow compute:/etc/
# pscp /etc/group compute:/etc/

Basic xCAT installation

This Blog entry is modified from Basic Install xCAT from xCAT wiki with some minor modification at point 7*, 8* and 9*

1. Pre-install

  • Internal IP of headnode – referred to as (xcat_int_ip)
  • External IP (internet connected) of headnode – referred to as (xcat_ext_ip)
  • External DNS server IP – referred to as (dns_ext_ip)
  • Cluster domain – referred to as (cluster_dom)

2. Network Wiring

  • eth0 is attached into an existing corporate network
  • eth1 is attached to the switch that the compute nodes are attached to

3. Setup Networking
Configure the Ethernet interfaces

vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
PEERDNS=no
BOOTPROTO=dhcp
HWADDR=00:14:5E:6B:18:21
ONBOOT=yes

ifdown eth0 && ifup eth0

vi /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
BOOTPROTO=static
HWADDR=00:14:5E:6B:18:22
ONBOOT=yes
IPADDR=(xcat_int_ip)
NETMASK=255.255.255.0

ifdown eth1 && ifup eth1

4. Install xCAT
Add the xCAT package repositories

cd /etc/yum.repos.d
wget http://xcat.sourceforge.net/yum/xcat-core/xCAT-core.repo
wget http://xcat.sourceforge.net/yum/xcat-dep/rh5/x86_64/xCAT-dep.repo
yum clean metadata
yum install xCAT

Verify the install

source /etc/profile.d/xcat.sh
tabdump site

If the tabdump command works, xCAT is installed. If it doesn’t work, check to ensure all previous steps completed sucessfully

5. Configure the xCAT site table.

  1. Set the dns to forward requests for the (dns_ext_ip) network
  2. Set the domain to (cluster_dom),
  3. Set the master and nameserver to (dns_ext_ip),
  4. Set eth1 to be the dhcp server interface
tabedit site

#key,value,comments,disable
"xcatdport","3001",,
"xcatiport","3002",,
"tftpdir","/tftpboot",,
"master","(xcat_int_ip)",,
"domain","(cluster_dom)",,
"installdir","/install",,
"timezone","America/Denver",,
"nameservers","(xcat_int_ip)",,
"forwarders","(dns_ext_ip)"
"dhcpinterfaces","eth1"
"ntpservers","0.north-america.pool.ntp.org"

6. Setup the xCAT networks table

tabedit networks

#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,dynamicrange,nodehostname,comments,disable
internal,"10.10.10.0","255.255.255.0","eth1","10.10.10.1","10.10.10.1","10.10.10.1","10.10.10.1",,,"10.10.10.200-10.10.10.254",,,
external,"192.168.0.0","255.255.0.0","eth0",,,,"192.168.0.1",,,,

There should be an entry for each network the nodes need to access. In this case, DNS is forwarded to the 192.168.0.1 server:

* 7. Setup the xCAT noderes table
(variation from xCAT wiki)
The noderes table defines the resources of the nodes. This includes all of the servers it uses to boot to a usable state and all the types of boot ups it will do.
Note: Primary interface (primarynic) for ipmi machines is the one where the BMC is set to. 

tabedit noderes

#node,servicenode,netboot,tftpserver,nfsserver,monserver,nfsdir,installnic,primarynic,discoverynics,cmdinterface,xcatmaster,current_osimage,next_osimage,nimserver,comments,disable
"compute",,"pxe","10.10.10.1","10.10.10.1",,"/install","eth0","eth0",,,,,,,,

*8. Setup the xCAT passwd table
(variation from xCAT wiki)

tabedit passwd

#key,username,password,comments,disable
"omapi","xcat_key","xxxxxxxxxx=",,
"system","root","passw0rd",,

The “omapi” is generated by xCAT. Don’t touch it. But you will need to include the 2nd line “system”

*9. Setup the xCAT chain table
(variation from xCAT wiki)

tabedit chain

#node,currstate,currchain,chain,ondiscover,comments,disable
"n00",,,,,,
"n01",,,,,,
"n02",,,,,,

*10. Setup the xCAT nodetype table
(variation from xCAT wiki)

tabedit nodetype

#node,os,arch,profile,provmethod,supportedarchs,nodetype,comments,disable
"n00","centos5.4","x86_64","compute",,,,,
"n01","centos5.4","x86_64","compute",,,,,
"n02","centos5.4","x86_64","compute",,,,,

11. Setup the xCAT hosts table

tabedit hosts

xcat,(xcat_int_ip)
"n00",(n00_ip)
"n01",(n01_ip)
"n02",(n02_ip)

12. Setup the xCAT mac table

tabedit mac

"n00","eth0",(mac)
"n01","eth0",(mac)
"n02","eth0",(mac)

13. Setup the xCAT nodelist table

tabedit nodelist

"n00","compute,all",,,
"n01","compute,all",,,
"n02","compute,all",,,

14. Setup the xCAT nodehm table

tabedit nodehm

"n00","ipmi","ipmi",,,,,,,,,,
"n01","ipmi","ipmi",,,,,,,,,,
"n02","ipmi","ipmi",,,,,,,,,,

15. Create the hosts file

makehosts all

There should entries in the /etc/hosts that reflect all the nodes

16. Create the DHCP files

makedhcp -n
makedhcp all
service dhcpd restart
chkconfig --level 345 dhcpd on

assuming all the nodes and devices are in the “all” group, that command will work:
Note: dhcpd does NOT need to be restarted after adding a node via makedhcp, but does after running the “-n” option which creates a new file

17. Edit /etc/resolv.conf

vi /etc/resolv.conf
search (xcat_dom)
nameserver (xcat_int_ip)

18. Build the DNS server

makedns
makedns all
service named restart
chkconfig --level 345 named on

assuming all the nodes and devices are in the “all” group, this command will work:
Note: named DOES need to be restarted after running a makedns command

19. Routing to the Internet through the Head Node

echo "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" >> /etc/rc.local
echo "echo 1 > /proc/sys/net/ipv4/ip_forward" >> /etc/rc.local

* Do remember to configure the gateway for each of the compute node to eth1 (private nic) of the Head Node. Go to client private nic /etc/sysconfig/network-scripts/ifcfg-eth0 and add “GATEWAY=(int_ip_address)”

The xCAT server should now be completely configured.

20. Setup Images

copycds CentOS-5.2-i386-bin-DVD.iso

Note: Do this for the DVD ISO and ”’NOT”’ the cd!

21. Install the node!

rinstall n01

That’s not all. See Using xCAT contributed scripts