Merge branch '2.8' of ssh://git.code.sf.net/p/xcat/xcat-core into 2.8

This commit is contained in:
Bruce Potter 2013-11-18 07:52:56 -05:00
commit fee08fb028
10 changed files with 91 additions and 8 deletions

View File

@ -179,6 +179,10 @@ sub process_request
$callback->($rsp);
next;
}
unless ( -d "$repos/environments") {
mkdir("$repos/environments", 0777);
}
my $tmperr = cloudvars(
$tmplfile,

View File

@ -1,4 +1,4 @@
#!/bin/sh -vx
#!/bin/sh
bridge_name="br-ex"
@ -19,7 +19,7 @@ str_value=$(hashget hash_defined_nics $pubinterface)
old_ifs=$IFS
IFS=$','
array_temp=($str_value)
FS=$old_ifs
IFS=$old_ifs
if [ -n "${array_temp[1]}" ];then
str_nic_type=`echo ${array_temp[1]} | tr "[A-Z]" "[a-z]"`
@ -35,7 +35,27 @@ else
fi
configeth $bridge_name ${array_temp[0]} ${array_temp[2]}
str_network=$(checknetwork ${array_temp[0]})
if [ -z "$str_network" ];then
logger -t xcat -p local4.info "configbr-ex: could not find the network for $bridge_name which is based on $pubinterface. Please check the networks and nics tables."
echo "configbr-ex: could not find the network for $bridge_name which is based on $pubinterface. Please check the networks and nics tables."
exit -1
fi
#configeth $bridge_name ${array_temp[0]} ${array_temp[2]}
configeth $bridge_name ${array_temp[0]} $str_network
if [ $? -ne 0 ];then
logger -t xcat -p local4.info "configbr-ex failed to configure $bridge_name : configeth $bridge_name ${array_temp[0]} $str_network"
echo "confignics: configbr-ex failed to configure $bridge_name : configeth $bridge_name ${array_temp[0]} $str_network"
exit -1
fi
. ./configgw $bridge_name
if [ $? -ne 0 ];then
logger -t xcat -p local4.info "configgw failed to configure gateway for $bridge_name."
echo "configgw failed to configure gateway for $bridge_name."
exit -1
fi
exit 0

View File

@ -573,8 +573,8 @@ sub backupxcatdb
}
}
# back it up
my $cmd = "dumpxCATdb -p $::backupdir";
# back it up in bypass mode ( do not require the xcatd running)
my $cmd = "XCATBYPASS=y dumpxCATdb -p $::backupdir";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{

View File

@ -699,7 +699,7 @@ sub mknetboot
$xcatmasterip = $xcatmaster;
}
$kcmdline .= "XCAT=$xcatmaster:$xcatdport ";
$kcmdline .= "XCAT=$xcatmasterip:$xcatdport ";
if ($rootfstype ne "ramdisk") {

View File

@ -218,6 +218,10 @@ unless ($onlyinitrd) {
foreach $pass (sort (keys(%pkg_hash))) {
my $pkgnames = "";
foreach (keys(%{$pkg_hash{$pass}})) {
if($_ eq "INCLUDEBAD") {
print "Unable to open the following pkglist files:\n".join("\n",@{$pkg_hash{$pass}{INCLUDEBAD}});
exit 1;
}
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE")) { next;}
my $pa=$pkg_hash{$pass}{$_};
$pkgnames .= " " . join(' ', @$pa);
@ -248,6 +252,12 @@ unless ($onlyinitrd) {
my $index=1;
foreach $pass (sort (keys(%extra_hash))) {
foreach (keys(%{$extra_hash{$pass}})) {
if($_ eq "INCLUDEBAD") {
print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}});
exit 1;
}
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE")) { next;}
print $yumconfig "[otherpkgs$index]\nname=otherpkgs$index\nbaseurl=file://$srcdir_otherpkgs/$_\ngpgpcheck=0\n\n";
$index++;

View File

@ -117,7 +117,7 @@ sub get_package_names {
}
}
#print "pkgtext=$pkgtext\n";
#print "\n\npkgtext=$pkgtext\n\n";
my @tmp=split(',', $pkgtext);
my $pass=1;
foreach (@tmp) {
@ -140,6 +140,15 @@ sub get_package_names {
$pkgnames{$pass}{ENVLIST} = [$env];
}
next;
} elsif (/^#INCLUDEBAD:([^#^\n]+)#/){
my $pa=$pkgnames{$pass}{INCLUDEBAD};
my $file=$1;
if (exists($pkgnames{$pass}{INCLUDEBAD})){
push(@$pa,$file);
} else {
$pkgnames{$pass}{INCLUDEBAD} =[$file];
}
next;
} elsif (/^#/) {
# ignore all other comment lines
next;

View File

@ -120,6 +120,12 @@ if ($otherpkglist) {
my $pass;
foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) {
foreach (keys(%{$extra_hash{$pass}})) {
if($_ eq "INCLUDEBAD") {
print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}});
exit 1;
}
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
print $yumconfig "[otherpkgs$index]\nname=otherpkgs$index\nbaseurl=file://$srcdir_otherpkgs/$_\ngpgpcheck=0\n\n";
$repohash{$pass}{$index} = 1;

View File

@ -276,11 +276,17 @@ unless ($onlyinitrd) {
}
my %pkg_hash=imgutils::get_package_names($pkglist);
my $index=1;
my $pass;
foreach $pass (sort {$a <=> $b} (keys(%pkg_hash))) {
my $pkgnames = "";
foreach (keys(%{$pkg_hash{$pass}})) {
if($_ eq "INCLUDEBAD") {
print "Unable to open the following pkglist files:\n".join("\n",@{$pkg_hash{$pass}{INCLUDEBAD}});
exit 1;
}
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
my $pa=$pkg_hash{$pass}{$_};
my @npa = ();
@ -350,6 +356,12 @@ unless ($onlyinitrd) {
my $index=1;
foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) {
foreach (keys(%{$extra_hash{$pass}})) {
if($_ eq "INCLUDEBAD") {
print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}});
exit 1;
}
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
print $yumconfig "[otherpkgs$index]\nname=otherpkgs$index\nbaseurl=file://$srcdir_otherpkgs/$_\ngpgpcheck=0\n\n";
$repohash{$pass}{$index} = 1;

View File

@ -316,6 +316,12 @@ unless ($onlyinitrd) {
my $pass;
foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) {
foreach (keys(%{$extra_hash{$pass}})) {
if($_ eq "INCLUDEBAD") {
print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}});
exit 1;
}
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
my $whole_path="$srcdir_otherpkgs/$_";
if (-r "$srcdir_otherpkgs/$_/repodata/repomd.xml") {
@ -395,6 +401,12 @@ unless ($onlyinitrd) {
$pkgnames = "";
$group_pkgnames = "";
foreach (keys(%{$pkg_hash{$pass}})) {
if($_ eq "INCLUDEBAD") {
print "Unable to open the following pkglist files:\n".join("\n",@{$pkg_hash{$pass}{INCLUDEBAD}});
exit 1;
}
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
my $pa=$pkg_hash{$pass}{$_};
# replace the kernel package with the name has the specific version

View File

@ -266,6 +266,11 @@ unless ($onlyinitrd) {
foreach $pass (sort {$a <=> $b} (keys(%pkg_hash))) {
my $pkgnames = "";
foreach (keys(%{$pkg_hash{$pass}})) {
if($_ eq "INCLUDEBAD") {
print "Unable to open the following pkglist files:\n".join("\n",@{$pkg_hash{$pass}{INCLUDEBAD}});
exit 1;
}
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
my $pa=$pkg_hash{$pass}{$_};
my @npa = ();
@ -357,6 +362,11 @@ unless ($onlyinitrd) {
my $index=1;
foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) {
foreach (keys(%{$extra_hash{$pass}})) {
if($_ eq "INCLUDEBAD") {
print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}});
exit 1;
}
if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;}
$index++;
my $pa=$extra_hash{$pass}{$_};