diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/install_new_kernel.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/install_new_kernel.rst index f9af23d82..35b340e0b 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/install_new_kernel.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/install_new_kernel.rst @@ -4,9 +4,9 @@ Installing a New Kernel in the Diskless Image Note: This procedure assumes you are using xCAT 2.6.1 or later. -The kerneldir attribute in linuximage table can be used to assign a directory containing kernel RPMs that can be installed into diskless images. The default for kernerdir is /install/kernels. To add a new kernel, create a directory named under the kerneldir, and genimage will pick them up from there. +To add a new kernel, create a directory named under ``/install/kernels`` directory, and ``genimage`` will pick them up from there. -The following examples assume you have the kernel RPM in /tmp and is using the default value for kerneldir (/install/kernels). +The following examples assume you have the kernel RPM in ``/tmp`` and is using a new kernel in the directory ``/install/kernels/``. The RPM names below are only examples, substitute your specific level and architecture. @@ -20,6 +20,9 @@ For example, kernel-3.10.0-229.ael7b.ppc64le.rpm means kernelver=3.10.0-229.ael7 mkdir -p /install/kernels/3.10.0-229.ael7b.ppc64le cp /tmp/kernel-3.10.0-229.ael7b.ppc64le.rpm /install/kernels/3.10.0-229.ael7b.ppc64le createrepo /install/kernels/3.10.0-229.ael7b.ppc64le/ + +Append kernel directory ``/install/kernels/`` in ``pkgdir`` of specific osimage. :: + chdef -t osimage -p pkgdir=/install/kernels/3.10.0-229.ael7b.ppc64le/ Run genimage/packimage to update the image with the new kernel. @@ -45,6 +48,9 @@ The "4.6.ppc64le" is replaced with "4-ppc64le": :: cp /tmp/kernel-default-3.12.28-4.6.ppc64le.rpm /install/kernels/3.12.28-4-ppc64le/ cp /tmp/kernel-default-base-3.12.28-4.6.ppc64le.rpm /install/kernels/3.12.28-4-ppc64le/ cp /tmp/kernel-default-devel-3.12.28-4.6.ppc64le.rpm /install/kernels/3.12.28-4-ppc64le/ + +Append kernel directory ``/install/kernels/`` in ``pkgdir`` of specific osimage. :: + chdef -t osimage -p pkgdir=/install/kernels/3.12.28-4-ppc64le/ Run genimage/packimage to update the image with the new kernel. diff --git a/xCAT-probe/lib/perl/probe_utils.pm b/xCAT-probe/lib/perl/probe_utils.pm index e7749f492..115814943 100644 --- a/xCAT-probe/lib/perl/probe_utils.pm +++ b/xCAT-probe/lib/perl/probe_utils.pm @@ -290,11 +290,11 @@ sub is_http_ready { my $installdir = shift; my $errormsg_ref = shift; - my $http_status = `netstat -tunlp | grep -e "httpd" -e "apache" | grep "LISTEN" 2>&1`; + my $http_status = `netstat -tnlp | grep -e "httpd" -e "apache" 2>&1`; if (!$http_status) { $$errormsg_ref = "No HTTP listening status get by command 'netstat'"; return 0; - } elsif ($http_status !~ /\S*\s+\S*\s+\S*\s+\S*$httpport\s+.+/) { + } elsif ($http_status !~ /\S*\s+\S*\s+\S*\s+\S*:$httpport\s+.+/) { $$errormsg_ref = "The port defined in 'site' table HTTP is not listening"; return 0; } diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index c36006d41..ab7896726 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -235,6 +235,11 @@ unless ($onlyinitrd) { my @pkgdir_internet; #Put all the http mirror in ths array, but only the first http mirror which will be used to create bootstrap my @pkgdir_local; #Put all directories except first in this array my $masternode = xCAT::TableUtils->get_site_Master(); + my $httpport="80"; + my @hports=xCAT::TableUtils->get_site_attribute("httpport"); + if ($hports[0]){ + $httpport=$hports[0]; + } $srcdir = undef; foreach my $dir (@srcdirs) { if ($dir =~ /^http.*/) { @@ -246,7 +251,7 @@ unless ($onlyinitrd) { $srcdir = $dir; find(\&isaptdir, <$dir/>); } else { #set other directory to http url - my $osuurl = "http://$masternode$dir ./"; + my $osuurl = "http://$masternode:$httpport$dir ./"; push @pkgdir_local, $osuurl; } } @@ -347,7 +352,7 @@ unless ($onlyinitrd) { open($aptconfig, ">", "$rootimg_dir/etc/apt/sources.list"); if ($srcdir) { - print $aptconfig "deb http://$masternode$srcdir $dist main\n"; + print $aptconfig "deb http://$masternode:$httpport$srcdir $dist main\n"; } foreach (@pkgdir_internet) { diff --git a/xCAT-test/autotest/testcase/rbeacon/cases0 b/xCAT-test/autotest/testcase/rbeacon/cases0 index e79195072..9f237fe7a 100644 --- a/xCAT-test/autotest/testcase/rbeacon/cases0 +++ b/xCAT-test/autotest/testcase/rbeacon/cases0 @@ -55,6 +55,6 @@ hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd:rbeacon $$CN abc check:rc!=0 -check:output=~$$CN\s*:\s*Error:\s*Only \'on\', \'off\' or \'stat\' is supported +check:output=~$$CN\s*:\s*Error:\s*Only \'on\', \'off\' and \'stat\' are supported end