mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-09-05 09:48:31 +00:00
Merge pull request #5870 from xcat2/master
Merge master to 2.14 branch for 2.14.5 release(2)
This commit is contained in:
@@ -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 <kernelver> under the kerneldir, and genimage will pick them up from there.
|
||||
To add a new kernel, create a directory named <kernelver> 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/<kernelver>``.
|
||||
|
||||
|
||||
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/<kernelver>`` in ``pkgdir`` of specific osimage. ::
|
||||
|
||||
chdef -t osimage <imagename> -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/<kernelver>`` in ``pkgdir`` of specific osimage. ::
|
||||
|
||||
chdef -t osimage <imagename> -p pkgdir=/install/kernels/3.12.28-4-ppc64le/
|
||||
|
||||
Run genimage/packimage to update the image with the new kernel.
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user