From e2708df2b4f92751a79bd132c44e5514b70b7593 Mon Sep 17 00:00:00 2001 From: immarvin Date: Sun, 17 Nov 2013 18:48:00 -0800 Subject: [PATCH 1/5] fix defect #3693 [DEV] rhels6.4-ppc64 statelite failed with (FATAL error: could not get the entries from litefile table...) when noderes.xcatmaster= --- xCAT-server/lib/xcat/plugins/anaconda.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 573498317..adfe266d8 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -699,7 +699,7 @@ sub mknetboot $xcatmasterip = $xcatmaster; } - $kcmdline .= "XCAT=$xcatmaster:$xcatdport "; + $kcmdline .= "XCAT=$xcatmasterip:$xcatdport "; if ($rootfstype ne "ramdisk") { From 43bc2d1e8eddaf2336efc494409f5bbc6660e197 Mon Sep 17 00:00:00 2001 From: immarvin Date: Wed, 6 Nov 2013 01:45:12 -0800 Subject: [PATCH 2/5] fix #3877 [FVT]genimage return confusing error message when xCAT-IBMhpc is not installed --- xCAT-server/share/xcat/netboot/fedora12/genimage | 10 ++++++++++ xCAT-server/share/xcat/netboot/imgutils/imgutils.pm | 11 ++++++++++- xCAT-server/share/xcat/netboot/mic/genimage | 6 ++++++ xCAT-server/share/xcat/netboot/rh/genimage | 12 ++++++++++++ xCAT-server/share/xcat/netboot/sles/genimage | 12 ++++++++++++ xCAT-server/share/xcat/netboot/ubuntu/genimage | 10 ++++++++++ 6 files changed, 60 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/fedora12/genimage b/xCAT-server/share/xcat/netboot/fedora12/genimage index a24fb0c13..74ba09017 100755 --- a/xCAT-server/share/xcat/netboot/fedora12/genimage +++ b/xCAT-server/share/xcat/netboot/fedora12/genimage @@ -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++; diff --git a/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm b/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm index 32787c595..c41848aa2 100644 --- a/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm +++ b/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm @@ -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; diff --git a/xCAT-server/share/xcat/netboot/mic/genimage b/xCAT-server/share/xcat/netboot/mic/genimage index 3be6eb295..6e1e52723 100755 --- a/xCAT-server/share/xcat/netboot/mic/genimage +++ b/xCAT-server/share/xcat/netboot/mic/genimage @@ -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; diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index cb35c3cc2..5769d2983 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -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; diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index 5d8f5df78..3a87e43a8 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -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 diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index 965de17a2..2a0bd3f3b 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -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}{$_}; From c8053583bdccf90c37a2ce045cc1f29b752a241c Mon Sep 17 00:00:00 2001 From: jjhua Date: Mon, 18 Nov 2013 15:37:15 -0500 Subject: [PATCH 3/5] fixed bug 3898 --- xCAT-OpenStack/postscripts/configbr-ex | 28 ++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/xCAT-OpenStack/postscripts/configbr-ex b/xCAT-OpenStack/postscripts/configbr-ex index 2ea97dce6..97dea5380 100755 --- a/xCAT-OpenStack/postscripts/configbr-ex +++ b/xCAT-OpenStack/postscripts/configbr-ex @@ -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 From e432c238f999fecffcc7e783cb33586fcc9b2e1d Mon Sep 17 00:00:00 2001 From: jjhua Date: Mon, 18 Nov 2013 16:26:03 -0500 Subject: [PATCH 4/5] fixed bug 3904, if the environements dir doesn't exsit, create it. --- xCAT-OpenStack/lib/perl/xCAT_plugin/cloud.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-OpenStack/lib/perl/xCAT_plugin/cloud.pm b/xCAT-OpenStack/lib/perl/xCAT_plugin/cloud.pm index b1c91fa37..f7c9cf263 100644 --- a/xCAT-OpenStack/lib/perl/xCAT_plugin/cloud.pm +++ b/xCAT-OpenStack/lib/perl/xCAT_plugin/cloud.pm @@ -179,6 +179,10 @@ sub process_request $callback->($rsp); next; } + + unless ( -d "$repos/environments") { + mkdir("$repos/environments", 0777); + } my $tmperr = cloudvars( $tmplfile, From 0804cf1ae6b3075a48d21964b2ac159427b0b939 Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 18 Nov 2013 06:50:18 -0500 Subject: [PATCH 5/5] Defect 3906 --- xCAT-client/bin/mysqlsetup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/mysqlsetup b/xCAT-client/bin/mysqlsetup index f9595d0e5..54236a051 100755 --- a/xCAT-client/bin/mysqlsetup +++ b/xCAT-client/bin/mysqlsetup @@ -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) {