IB support on RHEL6 code checkin.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8302 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
f55ef0b9dd
commit
59595ef4d2
@ -12,12 +12,21 @@ use Socket;
|
||||
my $PLTFRM = `uname`;
|
||||
chomp $PLTFRM;
|
||||
|
||||
my $OS_name;
|
||||
my $ib_driver;
|
||||
if ( $ENV{OSVER} && ($ENV{OSVER} =~ /rhe(\D+)(\d+)(\.\d+)?/) ) {
|
||||
if ( $2 > 5 ) {
|
||||
$ib_driver = "rdma"
|
||||
} else {
|
||||
$ib_driver = "openibd"
|
||||
}
|
||||
}
|
||||
|
||||
my $HOST = `hostname -s`;
|
||||
chomp $HOST;
|
||||
|
||||
my @nums = (0..1);
|
||||
my @nics;
|
||||
my $OS_name;
|
||||
foreach my $num ( @nums ) {
|
||||
# Take primary node name, add -ib$num and then reverse resolve to get what ip should be
|
||||
my $nic = "ib$num";
|
||||
@ -107,11 +116,15 @@ foreach my $num ( @nums ) {
|
||||
|
||||
if ( $PLTFRM eq "Linux" ) {
|
||||
|
||||
if ( -f "/etc/infiniband/openib.conf" )
|
||||
if ( -f "/etc/rdma/rdma.conf" )
|
||||
{
|
||||
updatefile("/etc/rdma/rdma.conf", "SDP_LOAD=yes", "SDP_LOAD=no");
|
||||
} elsif ( -f "/etc/infiniband/openib.conf" )
|
||||
{
|
||||
updatefile("/etc/infiniband/openib.conf", "SDP_LOAD=yes", "SDP_LOAD=no");
|
||||
}
|
||||
|
||||
|
||||
if ( $OS_name eq 'suse')
|
||||
{
|
||||
updatefile("/etc/modprobe.conf", "options ib_ehca nr_ports");
|
||||
@ -120,9 +133,9 @@ if ( $PLTFRM eq "Linux" ) {
|
||||
runcmd("echo 'options ib_ehca lock_hcalls=0' >> /etc/modprobe.conf");
|
||||
}
|
||||
|
||||
my $openibd_cmd = "/sbin/chkconfig --level 2345 openibd on";
|
||||
my $openibd_cmd = "/sbin/chkconfig --level 2345 $ib_driver on";
|
||||
runcmd($openibd_cmd);
|
||||
my $openibd_start_cmd = "/sbin/service openibd restart";
|
||||
my $openibd_start_cmd = "/sbin/service $ib_driver restart";
|
||||
runcmd($openibd_start_cmd);
|
||||
|
||||
runcmd("sysctl -p");
|
||||
|
@ -12,6 +12,16 @@ use Socket;
|
||||
my $PLTFRM = `uname`;
|
||||
chomp $PLTFRM;
|
||||
|
||||
my $OS_name;
|
||||
my $ib_driver;
|
||||
if ( $ENV{OSVER} && ($ENV{OSVER} =~ /rhe(\D+)(\d+)(\.\d+)?/) ) {
|
||||
if ( $2 > 5 ) {
|
||||
$ib_driver = "rdma"
|
||||
} else {
|
||||
$ib_driver = "openibd"
|
||||
}
|
||||
}
|
||||
|
||||
my $HOST = `hostname -s`;
|
||||
chomp $HOST;
|
||||
|
||||
@ -38,8 +48,7 @@ foreach my $num ( @nums ) {
|
||||
my $gateway = "$first.$second.255.254";
|
||||
|
||||
if ( $PLTFRM eq "Linux" ) {
|
||||
# Issue openibd for Linux at boot time
|
||||
my $OS_name;
|
||||
# Issue rdma for Linux at boot time
|
||||
if ( -f '/etc/redhat-release' )
|
||||
{
|
||||
$OS_name = "redhat";
|
||||
@ -108,21 +117,26 @@ foreach my $num ( @nums ) {
|
||||
|
||||
if ( $PLTFRM eq "Linux" ) {
|
||||
|
||||
if ( -f "/etc/infiniband/openib.conf" )
|
||||
if ( -f "/etc/rdma/rdma.conf" )
|
||||
{
|
||||
updatefile("/etc/rdma/rdma.conf", "SDP_LOAD=yes", "SDP_LOAD=no");
|
||||
} elsif ( -f "/etc/infiniband/openib.conf" )
|
||||
{
|
||||
updatefile("/etc/infiniband/openib.conf", "SDP_LOAD=yes", "SDP_LOAD=no");
|
||||
}
|
||||
|
||||
if ( -f "/etc/modprobe.conf" )
|
||||
{
|
||||
updatefile("/etc/modprobe.conf", "options ib_ehca nr_ports=1");
|
||||
updatefile("/etc/modprobe.conf", "options ib_ehca lock_hcalls=0");
|
||||
}
|
||||
|
||||
runcmd("echo 'options ib_ehca lock_hcalls=0' >> /etc/modprobe.conf");
|
||||
|
||||
my $openibd_cmd = "/sbin/chkconfig --level 2345 openibd on";
|
||||
runcmd($openibd_cmd);
|
||||
my $openibd_start_cmd = "/sbin/service openibd restart";
|
||||
runcmd($openibd_start_cmd);
|
||||
my $rdma_cmd = "/sbin/chkconfig --level 2345 $ib_driver on";
|
||||
runcmd($rdma_cmd);
|
||||
my $rdma_start_cmd = "/sbin/service $ib_driver restart";
|
||||
runcmd($rdma_start_cmd);
|
||||
|
||||
runcmd("sysctl -p");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user