14 Commits
2.8.4 ... 2.8

12 changed files with 103 additions and 20 deletions

View File

@ -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

View File

@ -662,7 +662,11 @@ sub mknetboot
$kcmdline = "NFSROOT=$nfssrv:$nfsdir STATEMNT=";
}
} else {
$kcmdline = "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg-statelite.gz STATEMNT=";
if (-r "$rootimgdir/rootimg-statelite.gz.metainfo") {
$kcmdline = "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg-statelite.gz.metainfo STATEMNT=";
} else {
$kcmdline = "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg-statelite.gz STATEMNT=";
}
}
# add support for subVars in the value of "statemnt"
@ -724,8 +728,13 @@ sub mknetboot
$kcmdline .= "NODE=$node ";
}
else {
$kcmdline =
"imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg.$suffix ";
if (-r "$rootimgdir/rootimg.$suffix.metainfo") {
$kcmdline =
"imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg.$suffix.metainfo ";
} else {
$kcmdline =
"imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg.$suffix ";
}
$kcmdline .= "XCAT=$xcatmaster:$xcatdport ";
$kcmdline .= "NODE=$node ";
# add flow control setting

View File

@ -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");

View File

@ -51,12 +51,14 @@ sub process_request {
my $rootimg_dir;
my $destdir;
my $imagename;
my $dotorrent;
GetOptions(
"profile|p=s" => \$profile,
"arch|a=s" => \$arch,
"osver|o=s" => \$osver,
"method|m=s" => \$method,
"tracker=s" => \$dotorrent,
"help|h" => \$help,
"version|v" => \$version
);
@ -386,6 +388,14 @@ sub process_request {
`$excludestr`;
if ($method =~ /cpio/) {
chmod 0644,"$destdir/rootimg.gz";
if ($dotorrent) {
my $currdir = getcwd;
chdir($destdir);
unlink("rootimg.gz.metainfo");
system("ctorrent -t -u $dotorrent -l 1048576 -s rootimg.gz.metainfo rootimg.gz");
chmod 0644, "rootimg.gz.metainfo";
chdir($currdir);
}
umask $oldmask;
} elsif ($method =~ /squashfs/) {
my $flags;

View File

@ -2120,6 +2120,7 @@ sub validate_node_entry{
$errmsg .= "MAC address $node_entry{$_} is invalid. You must use a valid MAC address.\n";
}else{
$allmacs{$node_entry{$_}} = 0;
$allmacsupper{uc($node_entry{$_})} = 0;
}
}elsif ($_ eq "ip"){
if (exists $allips{$node_entry{$_}}){

View File

@ -67,6 +67,7 @@ sub process_request {
my $exlist; # it is used when rootfstype = ramdisk
my $destdir;
my $imagename;
my $dotorrent;
GetOptions(
"rootfstype|t=s" => \$rootfstype,
@ -74,6 +75,7 @@ sub process_request {
"arch|a=s" => \$arch,
"osver|o=s" => \$osver,
"help|h" => \$help,
"tracker" => \$dotorrent,
"version|v" => \$version,
"verbose|V" => \$verbose
);
@ -534,6 +536,14 @@ sub process_request {
chdir("$rootimg_dir");
xCAT::Utils->runcmd("$excludestr");
chmod 0644, "$destdir/rootimg-statelite.gz";
if ($dotorrent) {
my $currdir = getcwd;
chdir($destdir);
unlink("rootimg-statelite.gz.metainfo");
system("ctorrent -t -u $dotorrent -l 1048576 -s rootimg-statelite.gz.metainfo rootimg.gz");
chmod 0644, "rootimg-statelite.gz.metainfo";
chdir($currdir);
}
umask $oldmask;
system("rm -f $xcat_packimg_tmpfile");

View File

@ -1,6 +1,7 @@
#!/bin/sh
echo $drivers
dracut_install wget cpio gzip dash modprobe touch echo cut wc
dracut_install wget cpio gzip dash modprobe touch echo cut wc
dracut_install -o ctorrent
dracut_install grep ifconfig hostname awk egrep grep dirname expr
dracut_install mount.nfs
dracut_install parted mke2fs bc mkswap swapon chmod

View File

@ -1,6 +1,7 @@
#!/bin/sh
echo $drivers
dracut_install wget cpio gzip dash modprobe wc touch echo cut
dracut_install -o ctorrent
dracut_install grep ifconfig hostname awk egrep grep dirname expr
dracut_install parted mke2fs bc mkswap swapon chmod
inst "$moddir/xcat-updateflag" "/tmp/updateflag"

View File

@ -45,6 +45,9 @@ if [ ! -z "$imgurl" ]; then
fi
#echo 0 > /proc/sys/vm/zone_reclaim_mode #Avoid kernel bug
if [ -r /*.metainfo ]; then
ctorrent /*.metainfo -e 0
fi
if [ -r /rootimg.sfs ]; then
echo Setting up squashfs with ram overlay.
mknod /dev/loop0 b 7 0

View File

@ -29,16 +29,16 @@ if [%3] EQU [bcdonly] set BCDONLY=1
if [%WINPENAME%] NEQ [] set BOOTPATH=winboot\%WINPENAME%\Boot
::location where Windows PE from ADK install is located
set adkpedir=%defdrive%\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment
set oscdimg=%defdrive%\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg
set adkpedir=%defdrive%\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment
set oscdimg=%defdrive%\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg
set WinPERoot=%adkpedir%
set OSCDImgRoot=%oscdimg%
set Path=C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\amd64\DISM;%Path%
set Path=C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\DISM;%Path%
::clean the c:\winPE_amd64 and copy it from ADK
if exist %defdrive%\WinPE_%SUFFIX% rd %defdrive%\WinPE_%SUFFIX% /s /q
set retpath=%cd%
cd "%adkpedir%"
cd /d "%adkpedir%"
call copype.cmd %ARCH% %defdrive%\WinPE_%SUFFIX%
cd /d %retpath%
@ -70,8 +70,8 @@ rem copy "%defdrive%\Program Files\Windows AIK\Tools\%ARCH%\imagex.exe" %defdriv
dism /Image:%defdrive%\WinPE_%SUFFIX%\mount /add-package /packagepath:"%adkpedir%\amd64\WinPE_OCs\WinPE-WMI.cab"
dism /Image:%defdrive%\WinPE_%SUFFIX%\mount /add-package /packagepath:"%adkpedir%\amd64\WinPE_OCs\WinPE-Scripting.cab"
dism /Image:%defdrive%\WinPE_%SUFFIX%\mount /add-package /packagepath:"%adkpedir%\amd64\WinPE_OCs\WinPE-RNDIS.cab"
dism /Image:%defdrive%\WinPE_%SUFFIX%\mount /add-package /packagepath:"%adkpedir%\amd64\WinPE_OCs\WinPE-NetFX4.cab"
dism /Image:%defdrive%\WinPE_%SUFFIX%\mount /add-package /packagepath:"%adkpedir%\amd64\WinPE_OCs\WinPE-PowerShell3.cab"
dism /Image:%defdrive%\WinPE_%SUFFIX%\mount /add-package /packagepath:"%adkpedir%\amd64\WinPE_OCs\WinPE-NetFX.cab"
dism /Image:%defdrive%\WinPE_%SUFFIX%\mount /add-package /packagepath:"%adkpedir%\amd64\WinPE_OCs\WinPE-PowerShell.cab"
dism /Image:%defdrive%\WinPE_%SUFFIX%\mount /add-package /packagepath:"%adkpedir%\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
dism /Image:%defdrive%\WinPE_%SUFFIX%\mount /add-package /packagepath:"%adkpedir%\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
dism /Image:%defdrive%\WinPE_%SUFFIX%\mount /add-package /packagepath:"%adkpedir%\amd64\WinPE_OCs\WinPE-WDS-Tools.cab"

View File

@ -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
@ -30,7 +30,7 @@ BEGIN
{
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
}
use Getopt::Long;
use Getopt::Long qw{:config bundling no_ignore_case};
use Data::Dumper;
use strict;
my $help;
@ -64,7 +64,7 @@ if (
"c=s" => \$cert,
"n=s" => \$hostname,
"o=s" => \$output,
"l=s" => \$loperator,
"O=s" => \$loperator,
"debug" => \$debug,
)
) {
@ -181,8 +181,8 @@ 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 " [-debug]\n";
print " [-o expect_output] [-O logical_operator] \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";

View File

@ -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