From 1bed59f0106dee3d832b76fd0d8de27e5fdcf054 Mon Sep 17 00:00:00 2001 From: mellor Date: Wed, 30 Apr 2014 17:49:31 -0400 Subject: [PATCH 01/16] defect 4035 handle multiple servicenode entries --- xCAT-server/lib/xcat/plugins/mic.pm | 38 +++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/mic.pm b/xCAT-server/lib/xcat/plugins/mic.pm index 1037c69b3..6da7c7395 100644 --- a/xCAT-server/lib/xcat/plugins/mic.pm +++ b/xCAT-server/lib/xcat/plugins/mic.pm @@ -612,7 +612,25 @@ sub rflash { # run the cmd on the host to flash the mic my @args = ("-s", "-v", "-e"); push @args, "$::XCATROOT/sbin/flashmic"; - my $master = $request->{'_xcatdest'}; + # assume that all hosts are on the same network connected to this master + # (otherwise, will need to move this call into loop above for each host + # and build separate miccfg calls for each unique returned value from + # my_ip_facing) + my $ipfn = xCAT::NetworkUtils->my_ip_facing(@hosts[0]); + if ($ipfn) { + $master = $ipfn; + } else { + my $hostname = ""; + my $hostnamecmd = "/bin/hostname"; + my @thostname = xCAT::Utils->runcmd($hostnamecmd, 0); + if ($::RUNCMD_RC = 0) { + $hostname = "from server $thostname[0]"; + } + xCAT::MsgUtils->message("E", {error=>["Cannot detect an active network interface $hostname to @hosts[0]."], errorcode=>["1"]}, $callback); + return; + } + +} push @args, ("-m", "$master"); push @args, ("-p", "$tftpdir/xcat/miccfg"); @@ -912,7 +930,23 @@ sub nodeset { # run the cmd on the host to configure the mic my @args = ("-s", "-v", "-e"); push @args, "$::XCATROOT/sbin/configmic"; - my $master = $request->{'_xcatdest'}; + # assume that all hosts are on the same network connected to this master + # (otherwise, will need to move this call into loop above for each host + # and build separate miccfg calls for each unique returned value from + # my_ip_facing) + my $ipfn = xCAT::NetworkUtils->my_ip_facing(@hosts[0]); + if ($ipfn) { + $master = $ipfn; + } else { + my $hostname = ""; + my $hostnamecmd = "/bin/hostname"; + my @thostname = xCAT::Utils->runcmd($hostnamecmd, 0); + if ($::RUNCMD_RC = 0) { + $hostname = "from server $thostname[0]"; + } + xCAT::MsgUtils->message("E", {error=>["Cannot detect an active network interface $hostname to @hosts[0]."], errorcode=>["1"]}, $callback); + return; + } push @args, ("-m", "$master"); push @args, ("-p", "$tftpdir/xcat/miccfg"); From 8071c719c6645ac74186f988708378aa910aa081 Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 12 May 2014 10:43:52 -0400 Subject: [PATCH 02/16] defect 4076 --- xCAT-rmc/xCAT-rmc.spec | 2 +- xCAT-server/lib/xcat/plugins/imgport.pm | 2 +- xCAT-server/lib/xcat/plugins/kit.pm | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-rmc/xCAT-rmc.spec b/xCAT-rmc/xCAT-rmc.spec index 6262886df..d7c6f6e73 100644 --- a/xCAT-rmc/xCAT-rmc.spec +++ b/xCAT-rmc/xCAT-rmc.spec @@ -106,7 +106,7 @@ fi %ifos linux if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image if [ -f $RPM_INSTALL_PREFIX0/sbin/xcatd ]; then - /etc/init.d/xcatd reload + /etc/init.d/xcatd restart fi fi %else diff --git a/xCAT-server/lib/xcat/plugins/imgport.pm b/xCAT-server/lib/xcat/plugins/imgport.pm index c5a88e336..cec8609d2 100644 --- a/xCAT-server/lib/xcat/plugins/imgport.pm +++ b/xCAT-server/lib/xcat/plugins/imgport.pm @@ -1901,7 +1901,7 @@ sub make_files { } if ( $hasplugin ) { # Issue xcatd reload to load the new plugins - system("/etc/init.d/xcatd reload"); + system("/etc/init.d/xcatd restart"); $hasplugin=0; } diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index 0d6912c54..0a074fa70 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -1411,7 +1411,7 @@ sub addkit if ( $hasplugin ) { # Issue xcatd reload to load the new plugins - system("/etc/init.d/xcatd reload"); + system("/etc/init.d/xcatd restart"); } } } @@ -1716,7 +1716,7 @@ sub rmkit if ( $hasplugin ) { # Issue xcatd reload to load the new plugins - system("/etc/init.d/xcatd reload"); + system("/etc/init.d/xcatd restart"); } } From 1700471ada3cdff742c337fa11ecb8c45db0178d Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 12 May 2014 10:46:39 -0400 Subject: [PATCH 03/16] defect 4076 --- xCAT-OpenStack/xCAT-OpenStack.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-OpenStack/xCAT-OpenStack.spec b/xCAT-OpenStack/xCAT-OpenStack.spec index d0ff64bab..7f1817951 100644 --- a/xCAT-OpenStack/xCAT-OpenStack.spec +++ b/xCAT-OpenStack/xCAT-OpenStack.spec @@ -89,7 +89,7 @@ rm -rf $RPM_BUILD_ROOT %ifos linux if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image if [ -f $RPM_INSTALL_PREFIX0/sbin/xcatd ]; then - /etc/init.d/xcatd reload + /etc/init.d/xcatd restart fi fi %endif From d8431f4fd32e9048f9e52c287bb6aeb2929227c6 Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 12 May 2014 12:48:04 -0400 Subject: [PATCH 04/16] defect 4124 --- xCAT/postscripts/setupnfsv4replication | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT/postscripts/setupnfsv4replication b/xCAT/postscripts/setupnfsv4replication index 092007aef..663fcd1cf 100755 --- a/xCAT/postscripts/setupnfsv4replication +++ b/xCAT/postscripts/setupnfsv4replication @@ -10,7 +10,7 @@ # Change these two parameters according to your requirements $::NFSRETRIES = 3; -$::NFSTIMEO = 10; +$::NFSTIMEO = 50; # Candidate commands: mount, df, lsfs, nfs4cl showfs # Only the mount command could list all file systems From 0e21fa39310f4d3d623d74205b69fe787c34e1e4 Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 12 May 2014 13:25:44 -0400 Subject: [PATCH 05/16] backup 4091, not correct --- xCAT/postscripts/setupesx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 xCAT/postscripts/setupesx diff --git a/xCAT/postscripts/setupesx b/xCAT/postscripts/setupesx old mode 100644 new mode 100755 index 3f6a9f09e..0e062cd60 --- a/xCAT/postscripts/setupesx +++ b/xCAT/postscripts/setupesx @@ -43,9 +43,9 @@ cat >/tmp/esxcfg.sh < Date: Tue, 13 May 2014 05:37:14 -0700 Subject: [PATCH 06/16] Modify flag and help information --- xCAT-test/restapitest | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-test/restapitest b/xCAT-test/restapitest index 425ef7b2a..df87c9068 100755 --- a/xCAT-test/restapitest +++ b/xCAT-test/restapitest @@ -14,7 +14,7 @@ # -n hostname # Flags are used for check output: # -o expected output -# -l logical operator +# -O logical operator # # Expected result format is '{ANY:{ANY:content}}' # These steps are used to explain how to scan result @@ -64,7 +64,7 @@ if ( "c=s" => \$cert, "n=s" => \$hostname, "o=s" => \$output, - "l=s" => \$loperator, + "O=s" => \$loperator, "debug" => \$debug, ) ) { @@ -181,7 +181,7 @@ sub usage print " testrestapi [-m method] [-r resource] [-t tocken]\n"; print " [-h host] [-P port][-u user] [-p passwd]\n"; print " [-d data] [-c cert] [-n hostname]\n"; - print " [-o expect_output] [-l logical_operator] [-debug]\n"; + print " [-o expect_output] [-O logical_operator] \n"; print " [-debug]\n"; print "\n"; return; From e4befe9959542bce6d569c9b0a658d8bf72fe4b8 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 13 May 2014 09:06:51 -0400 Subject: [PATCH 07/16] defect 4091 --- xCAT/postscripts/updatenetwork | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/updatenetwork b/xCAT/postscripts/updatenetwork index 40d76a51d..d1bcd6a4c 100644 --- a/xCAT/postscripts/updatenetwork +++ b/xCAT/postscripts/updatenetwork @@ -11,7 +11,8 @@ hostname $HOSTNAME #write the config files, the device name may change after reboot #so use the dhcp for all interface -device_names=`ifconfig -a | grep -i hwaddr | grep -i 'Ethernet' | grep -v usb| awk '{print $1}'` +#device_names=`ifconfig -a | grep -i hwaddr | grep -i 'Ethernet' | grep -v usb| awk '{print $1}'` +device_names=`ip link |grep "BROADCAST" |awk '{print $2}' | sed s/://` str_cfg_file='' if [ -d "/etc/sysconfig/network-scripts/" ];then #redhat From 231dbd84f5affd0d940ffd87c7ee4c4b8b81ff16 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Wed, 14 May 2014 08:03:35 -0400 Subject: [PATCH 08/16] use ip command to replace ifconfig in xcatroot for diskless on rh3 --- .../share/xcat/netboot/rh/dracut_033/xcatroot | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot index 4cde3f1ca..feed0dcd3 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot @@ -218,6 +218,25 @@ else fi cd / +function getdevfrommac() { + boothwaddr=$1 + ip link show | while read line + do + dev=`echo $line | egrep "^[0-9]+: [0-9A-Za-z]+" | cut -d ' ' -f 2 | cut -d ':' -f 1` + if [ "X$dev" != "X" ]; then + devname=$dev + fi + + if [ "X$devname" != "X" ]; then + hwaddr=`echo $line | egrep "^[ ]*link" | awk '{print $2}'` + if [ "X$hwaddr" = "X$boothwaddr" ]; then + echo $devname + fi + fi + done +} + + if [ -z $STATEMNT ]; then for lf in /tmp/dhclient.*.lease; do netif=${lf#*.} @@ -233,7 +252,7 @@ if [ -z $STATEMNT ]; then MACX=`ip link show $netdev | grep ether | awk '{print $2}'` elif [ ! -z "$BOOTIF" ]; then MACX=$BOOTIF - ETHX=`ifconfig |grep -i $BOOTIF | awk '{print $1}'` + ETHX=$(getdevfrommac $BOOTIF) fi if [ ! -z "$MACX" ] && [ ! -z "$ETHX" ]; then From 269ef4d95042c4196ceb80e4cd64090efe8a984a Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 14 May 2014 08:01:41 -0400 Subject: [PATCH 09/16] defect 4091 --- xCAT/postscripts/hardeths | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/xCAT/postscripts/hardeths b/xCAT/postscripts/hardeths index 68e963c22..b29e2953c 100755 --- a/xCAT/postscripts/hardeths +++ b/xCAT/postscripts/hardeths @@ -1,4 +1,4 @@ -#!/bin/sh +PREFIXMASK#!/bin/sh # pmatch determines if 1st argument string is matched by 2nd argument pattern pmatch () @@ -9,6 +9,18 @@ pmatch () return 1 # non-zero return code means string not matched by pattern } +# converts netmask CIDR fromat to x.x.x.x mask value +maskfromprefix () +{ + prefixlen=$1 + maskval=$((0xffffffff>>(32-prefixlen)<<(32-prefixlen))) + mask1=$((maskval >> 24)) + mask2=$((maskval >> 16 & 0xff)) + mask3=$((maskval >> 8 & 0xff)) + mask4=$((maskval & 0xff)) + echo $mask1.$mask2.$mask3.$mask4 + NETMASK=$mask1.$mask2.$mask3.$mask4 +} network_ipv4calc () { @@ -56,9 +68,12 @@ else echo "GATEWAY=$defgw" >> /etc/sysconfig/network fi fi -for nic in `ifconfig -a|grep -B1 "inet addr"|awk '{print $1}'|grep -v inet|grep -v -- --|grep -v lo`; do - IPADDR=`ifconfig $nic |grep "inet addr"|awk '{print $2}' |awk -F: '{print $2}'` - NETMASK=`ifconfig $nic |grep "inet addr"|awk '{print $4}' |awk -F: '{print $2}'` +for nic in `ip link |grep "BROADCAST" |awk '{print $2}' | sed s/://`; do + IPADDRMASK=`ip addr show dev $nic | grep inet | grep -v inet6 | awk '{print $2}' | head -n 1` + IPADDR=`echo $IPADDRMASK | awk -F'/' '{print $1}'` + PREFIXMASK=`echo $IPADDRMASK | awk -F'/' '{print $2}'` + # converts to x.x.x.x mask value + maskfromprefix $PREFIXMASK if ( pmatch $OSVER "ubuntu*" ) then NETWORK=`network_ipv4calc $IPADDR $NETMASK` @@ -69,7 +84,7 @@ for nic in `ifconfig -a|grep -B1 "inet addr"|awk '{print $1}'|grep -v inet|grep else gateway_line="" fi - + # add info to interfaces file on ubuntu, TBD does unbuntu change to systemd, this will not exist cat >>/etc/network/interfaces < Date: Thu, 15 May 2014 03:54:58 -0400 Subject: [PATCH 10/16] for rh7, the initrd for stateless has to been built first to make the installkernel cfg file added first --- xCAT-server/share/xcat/netboot/rh/genimage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 0acc19ed4..7fc298298 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -779,8 +779,8 @@ system("chroot $rootimg_dir depmod $kernelver"); # the other one is for statelite if ($dracutmode) { - mkinitrd_dracut("statelite"); mkinitrd_dracut("stateless"); + mkinitrd_dracut("statelite"); } else { mkinitrd("statelite"); mkinitrd("stateless"); From ff172d1ef18d5d40d462ee6e70e802b69640a4e3 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Thu, 15 May 2014 06:56:19 -0400 Subject: [PATCH 11/16] rh7 diskless support that don't cfg tmp in fstab --- .../share/xcat/netboot/rh/compute.rhels7.ppc64.postinstall | 2 -- 1 file changed, 2 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/compute.rhels7.ppc64.postinstall b/xCAT-server/share/xcat/netboot/rh/compute.rhels7.ppc64.postinstall index ad071c87c..246dbdd63 100755 --- a/xCAT-server/share/xcat/netboot/rh/compute.rhels7.ppc64.postinstall +++ b/xCAT-server/share/xcat/netboot/rh/compute.rhels7.ppc64.postinstall @@ -26,8 +26,6 @@ proc /proc proc rw 0 0 sysfs /sys sysfs rw 0 0 devpts /dev/pts devpts rw,gid=5,mode=620 0 0 ${profile}_${arch} / tmpfs rw 0 1 -none /tmp tmpfs defaults,size=10m 0 2 -none /var/tmp tmpfs defaults,size=10m 0 2 END From aea0692520875463654c7bc74125810d3b51ee93 Mon Sep 17 00:00:00 2001 From: yinle Date: Thu, 15 May 2014 06:21:46 -0700 Subject: [PATCH 12/16] Modify match info --- xCAT-test/restapitest | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xCAT-test/restapitest b/xCAT-test/restapitest index df87c9068..997cd9c10 100755 --- a/xCAT-test/restapitest +++ b/xCAT-test/restapitest @@ -182,7 +182,7 @@ sub usage print " [-h host] [-P port][-u user] [-p passwd]\n"; print " [-d data] [-c cert] [-n hostname]\n"; print " [-o expect_output] [-O logical_operator] \n"; - print " [-debug]\n"; + print " [--debug]\n"; print "\n"; return; } @@ -333,7 +333,7 @@ sub parse_json my @all = split /,/, $content; foreach my $n (@all) { $n =~ /\"(.*)\"/; - $hash{$1} = 1; + $hash{$1} = "restapiarray"; } return \%hash; } @@ -402,9 +402,13 @@ sub check_result my @actualvalue = split /:/, $actual; # @actualvalue = nodetype, arch, x86_64 print_debug("begin to compare $expval and $actualvalue[$flag]"); + if(($expval eq "restapiarray" ) and ($actualvalue[$flag] eq "restapiarray")){ + next; + } + if(($expval eq $actualvalue[$flag]) or ($expval eq "ANY")) { #ANY =~ nodetype $flaghash{$actual} = "eq"; - } elsif (($expval =~ $actualvalue[$flag]) or ($expval eq "ANY")) { + } elsif (($actualvalue[$flag] =~ $expval) or ($expval eq "ANY")) { $flaghash{$actual} = "match"; } else { $flaghash{$actual} = "none"; From 23bd81f4a6fb6ada73c4d1cc53ee891fc0cd160e Mon Sep 17 00:00:00 2001 From: yinle Date: Thu, 15 May 2014 06:39:26 -0700 Subject: [PATCH 13/16] minor fix --- xCAT-test/restapitest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/restapitest b/xCAT-test/restapitest index 997cd9c10..1e4fd4e09 100755 --- a/xCAT-test/restapitest +++ b/xCAT-test/restapitest @@ -30,7 +30,7 @@ BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; } -use Getopt::Long; +use Getopt::Long qw{:config bundling bundling no_ignore_case}; use Data::Dumper; use strict; my $help; From 956f45d7b36381743c985d97b381411f75f43c54 Mon Sep 17 00:00:00 2001 From: yinle Date: Thu, 15 May 2014 06:48:24 -0700 Subject: [PATCH 14/16] minor fix --- xCAT-test/restapitest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/restapitest b/xCAT-test/restapitest index 1e4fd4e09..1e0682fc2 100755 --- a/xCAT-test/restapitest +++ b/xCAT-test/restapitest @@ -30,7 +30,7 @@ BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; } -use Getopt::Long qw{:config bundling bundling no_ignore_case}; +use Getopt::Long qw{:config bundling no_ignore_case}; use Data::Dumper; use strict; my $help; From 86ce2a4ccb2d30c3a714c2ea88ec117e44edbd12 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Thu, 15 May 2014 00:43:52 -0700 Subject: [PATCH 15/16] fix bugs about petitboot configure file, ubuntu sshd issue --- xCAT-server/lib/xcat/plugins/anaconda.pm | 6 ++-- xCAT-server/lib/xcat/plugins/petitboot.pm | 30 +++++++++++++++---- .../install/pkvm/compute.pkvm2.ppc64.tmpl | 3 +- xCAT/postscripts/remoteshell | 3 +- 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 52229e21e..4aed0572a 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -1539,9 +1539,9 @@ sub mkinstall foreach(@addfiles){ $kcmdline .= " --- $rtftppath/$_"; } - }elsif ($pkvm) { - $k = "$httpmethod://$instserver:$httpport$tftppath/vmlinuz"; - $i = "$httpmethod://$instserver:$httpport$tftppath/initrd.img"; + #}elsif ($pkvm) { + # $k = "$httpmethod://$instserver:$httpport$tftppath/vmlinuz"; + # $i = "$httpmethod://$instserver:$httpport$tftppath/initrd.img"; }else{ $k = "$rtftppath/vmlinuz"; $i = "$rtftppath/initrd.img"; diff --git a/xCAT-server/lib/xcat/plugins/petitboot.pm b/xCAT-server/lib/xcat/plugins/petitboot.pm index 3e44a097d..dda254b19 100644 --- a/xCAT-server/lib/xcat/plugins/petitboot.pm +++ b/xCAT-server/lib/xcat/plugins/petitboot.pm @@ -10,6 +10,10 @@ my $globaltftpdir = xCAT::TableUtils->getTftpDir(); my %usage = ( "nodeset" => "Usage: nodeset osimage[=]", ); + +my $httpmethod="http"; +my $httpport = "80"; + sub handled_commands { return { nodeset => "noderes:netboot" @@ -79,7 +83,21 @@ sub setstate { my %nrhash = %{shift()}; my $linuximghash = shift(); my $kern = $bphash{$node}->[0]; #$bptab->getNodeAttribs($node,['kernel','initrd','kcmdline']); - if ($kern->{kcmdline} =~ /!myipfn!/) { + #my $nodereshash=$noderestab->getNodesAttribs(\@nodes,['tftpdir','xcatmaster','nfsserver', 'servicenode']); + if ($kern->{kernel} !~ /^$tftpdir/) { + my $nodereshash = $nrhash{$node}->[0]; + my $installsrv; + if ($nodereshash and $nodereshash->{nfsserver} ) { + $installsrv = $nodereshash->{nfsserver}; + } elsif ($nodereshash->{xcatmaster}) { + $installsrv = $nodereshash->{xcatmaster}; + } else { + $installsrv = '!myipfn!'; + } + $kern->{kernel} = "$httpmethod://$installsrv:$httpport$tftpdir/".$kern->{kernel}; + $kern->{initrd} = "$httpmethod://$installsrv:$httpport$tftpdir/".$kern->{initrd}; + } + if ($kern->{kcmdline} =~ /!myipfn!/ or $kern->{kernel} =~ /!myipfn!/) { my $ipfn = xCAT::NetworkUtils->my_ip_facing($node); unless ($ipfn) { my $servicenodes = $nrhash{$node}->[0]; @@ -118,6 +136,8 @@ sub setstate { $kern->{kcmdline} =~ s/!myipfn!/$ipfn/g; } } + + if ($kern->{addkcmdline}) { $kern->{kcmdline} .= " ".$kern->{addkcmdline}; } @@ -303,6 +323,8 @@ sub process_request { my $command = $request->{command}->[0]; %breaknetbootnodes=(); %normalnodes=(); + if ($::XCATSITEVALS{"httpmethod"}) { $httpmethod = $::XCATSITEVALS{"httpmethod"}; } + if ($::XCATSITEVALS{"httpport"}) { $httpport = $::XCATSITEVALS{"httpport"}; } my @args; my @nodes; @@ -384,11 +406,9 @@ sub process_request { my $chaintab=xCAT::Table->new('chain',-create=>1); my $chainhash=$chaintab->getNodesAttribs(\@nodes,['currstate']); my $noderestab=xCAT::Table->new('noderes',-create=>1); - my $nodereshash=$noderestab->getNodesAttribs(\@nodes,['tftpdir']); + my $nodereshash=$noderestab->getNodesAttribs(\@nodes,['tftpdir','xcatmaster','nfsserver', 'servicenode']); my $mactab=xCAT::Table->new('mac',-create=>1); my $machash=$mactab->getNodesAttribs(\@nodes,['mac']); - my $nrtab=xCAT::Table->new('noderes',-create=>1); - my $nrhash=$nrtab->getNodesAttribs(\@nodes,['servicenode']); my $typetab=xCAT::Table->new('nodetype',-create=>1); my $typehash=$typetab->getNodesAttribs(\@nodes,['os','provmethod','arch','profile']); my $linuximgtab=xCAT::Table->new('linuximage',-create=>1); @@ -415,7 +435,7 @@ sub process_request { my $linuximghash = $linuximghash = $linuximgtab->getAttribs({imagename => $osimgname}, 'boottarget', 'addkcmdline'); - ($rc,$errstr) = setstate($_,$bphash,$chainhash,$machash,$tftpdir,$nrhash,$linuximghash); + ($rc,$errstr) = setstate($_,$bphash,$chainhash,$machash,$tftpdir,$nodereshash,$linuximghash); if ($rc) { $response{node}->[0]->{errorcode}->[0]= $rc; $response{node}->[0]->{errorc}->[0]= $errstr; diff --git a/xCAT-server/share/xcat/install/pkvm/compute.pkvm2.ppc64.tmpl b/xCAT-server/share/xcat/install/pkvm/compute.pkvm2.ppc64.tmpl index 3b09adb42..8a8cbcc6b 100644 --- a/xCAT-server/share/xcat/install/pkvm/compute.pkvm2.ppc64.tmpl +++ b/xCAT-server/share/xcat/install/pkvm/compute.pkvm2.ppc64.tmpl @@ -27,7 +27,8 @@ rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password# #partition / --ondisk=/dev/mapper/ibmpkvm_vg_root-ibmpkvm_lv_root partition / --ondisk=/dev/sda -network --bootproto dhcp +#the --devicename must specify right now, but without network command, it can also work, so we delete it. +#network --bootproto dhcp %post touch "/startpost" diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell index 928e7bcf5..e9ee00590 100755 --- a/xCAT/postscripts/remoteshell +++ b/xCAT/postscripts/remoteshell @@ -47,7 +47,8 @@ then echo "KeyRegenerationInterval 0" >>/etc/ssh/sshd_config sed -i '/MaxStartups /'d /etc/ssh/sshd_config echo "MaxStartups 1024" >>/etc/ssh/sshd_config - + sed -i 's/^\s*\(PermitRootLogin\s*\).*/\1yes/' /etc/ssh/sshd_config + if [ "$SETUPFORPCM" = "1" ];then sed -i '/PasswordAuthentication /'d /etc/ssh/sshd_config echo "PasswordAuthentication yes" >>/etc/ssh/sshd_config From 4940f8ab801cb9f2e3be6473f6e2be6fcbbf6fb5 Mon Sep 17 00:00:00 2001 From: baiyuan Date: Thu, 15 May 2014 03:49:41 -0400 Subject: [PATCH 16/16] support compiler xlf15 and xlc13 on aix --- .../xcat/IBMhpc/compilers/compilers_xlf15_xlc13.bnd | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 xCAT-IBMhpc/share/xcat/IBMhpc/compilers/compilers_xlf15_xlc13.bnd diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/compilers/compilers_xlf15_xlc13.bnd b/xCAT-IBMhpc/share/xcat/IBMhpc/compilers/compilers_xlf15_xlc13.bnd new file mode 100644 index 000000000..15b5898d2 --- /dev/null +++ b/xCAT-IBMhpc/share/xcat/IBMhpc/compilers/compilers_xlf15_xlc13.bnd @@ -0,0 +1,10 @@ +# AIX Bundle file for compiler runtime packages + +I:xlC.aix61 +I:xlC.rte +I:xlfrte +I:xlfrte.aix61 +I:xlfrte.msg.en_US +I:xlsmp.aix61.rte +I:xlsmp.msg.en_US.rte +I:xlsmp.rte