diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm
index b0dbd8104..bb65cbd97 100644
--- a/xCAT-server/lib/xcat/plugins/anaconda.pm
+++ b/xCAT-server/lib/xcat/plugins/anaconda.pm
@@ -335,9 +335,15 @@ sub mknetboot
$cfgpart = $ph->{'cfgpart'};
}
else {
- # This is deprecated mode to define node's provmethod, not supported now.
- xCAT::MsgUtils->report_node_error($callback, $node, "OS image name must be specified in nodetype.provmethod");
- next;
+ my @ents = xCAT::TableUtils->get_site_attribute("disablenodesetwarning");
+ my $site_ent = $ents[0];
+ if (!defined($site_ent) || ($site_ent =~ /no/i) || ($site_ent =~ /0/))
+ {
+ if (!defined($::DISABLENODESETWARNING)) { # set by AAsn.pm
+ xCAT::MsgUtils->report_node_error($callback, $node, "OS image name must be specified in nodetype.provmethod");
+ next;
+ }
+ }
$osver = $ent->{os};
$arch = $ent->{arch};
@@ -1064,9 +1070,15 @@ sub mkinstall
xCAT::MsgUtils->trace($verbose_on_off, "d", "anaconda->mkinstall: imagename=$imagename pkgdir=$pkgdir pkglistfile=$pkglistfile tmplfile=$tmplfile partfile=$partfile");
}
else {
- # Not support the depreate mode now.
- xCAT::MsgUtils->report_node_error($callback, $node, "OS image name must be specified in nodetype.provmethod");
- next;
+ my @ents = xCAT::TableUtils->get_site_attribute("disablenodesetwarning");
+ my $site_ent = $ents[0];
+ if (!defined($site_ent) || ($site_ent =~ /no/i) || ($site_ent =~ /0/))
+ {
+ if (!defined($::DISABLENODESETWARNING)) { # set by AAsn.pm
+ xCAT::MsgUtils->report_node_error($callback, $node, "OS image name must be specified in nodetype.provmethod");
+ next;
+ }
+ }
$os = $ent->{os};
$arch = $ent->{arch};
diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm
index fe288bd0f..e3fac8e27 100644
--- a/xCAT-server/lib/xcat/plugins/sles.pm
+++ b/xCAT-server/lib/xcat/plugins/sles.pm
@@ -37,10 +37,10 @@ sub handled_commands
{
return {
copycd => "sles",
- mknetboot => "nodetype:os=(sles.*)|(suse.*)",
- mkinstall => "nodetype:os=(sles.*)|(suse.*)",
- mkstatelite => "nodetype:os=(sles.*)",
- mksysclone => "nodetype:os=(sles.*)|(suse.*)"
+ mknetboot => "nodetype:os=(sle.*)|(suse.*)",
+ mkinstall => "nodetype:os=(sle.*)|(suse.*)",
+ mkstatelite => "nodetype:os=(sle.*)",
+ mksysclone => "nodetype:os=(sle.*)|(suse.*)"
};
}
@@ -203,8 +203,15 @@ sub mknetboot
}
} else {
# This is deprecated mode to define node's provmethod, not supported now.
- xCAT::MsgUtils->report_node_error($callback, $node, "OS image name must be specified in nodetype.provmethod");
- next;
+ my @ents = xCAT::TableUtils->get_site_attribute("disablenodesetwarning");
+ my $site_ent = $ents[0];
+ if (!defined($site_ent) || ($site_ent =~ /no/i) || ($site_ent =~ /0/))
+ {
+ if (!defined($::DISABLENODESETWARNING)) { # set by AAsn.pm
+ xCAT::MsgUtils->report_node_error($callback, $node, "OS image name must be specified in nodetype.provmethod");
+ next;
+ }
+ }
$osver = $ent->{os};
$arch = $ent->{arch};
@@ -849,15 +856,22 @@ sub mkinstall
xCAT::MsgUtils->trace($verbose_on_off, "d", "sles->mkinstall: imagename=$imagename pkgdir=$pkgdir pkglistfile=$pkglistfile tmplfile=$tmplfile partfile=$partfile");
}
else {
- # This is deprecated mode to define node's provmethod, not supported now.
- xCAT::MsgUtils->report_node_error($callback, $node, "OS image name must be specified in nodetype.provmethod");
- next;
-
+ my @ents = xCAT::TableUtils->get_site_attribute("disablenodesetwarning");
+ my $site_ent = $ents[0];
+ if (!defined($site_ent) || ($site_ent =~ /no/i) || ($site_ent =~ /0/))
+ {
+ if (!defined($::DISABLENODESETWARNING)) { # set by AAsn.pm
+ xCAT::MsgUtils->report_node_error($callback, $node, "OS image name must be specified in nodetype.provmethod");
+ next;
+ }
+ }
$os = $ent->{os};
$arch = $ent->{arch};
$profile = $ent->{profile};
if ($os =~ /sles.*/) {
$plat = "sles";
+ } elsif ($os =~ /sle.*/) {
+ $plat = "sle";
} elsif ($os =~ /suse.*/) {
$plat = "suse";
} else {
@@ -1604,7 +1618,7 @@ sub copycd
$path =~ s,//*,/,g;
}
- if ($distname and $distname !~ /^sles|^suse/)
+ if ($distname and $distname !~ /^sle|^suse/)
{
#If they say to call it something other than SLES or SUSE, give up?
@@ -1612,121 +1626,137 @@ sub copycd
}
#parse the disc info of the os media to get the distribution, arch of the os
- unless (-r $mntpath . "/content")
- {
- return;
- }
- my $dinfo;
- open($dinfo, $mntpath . "/content");
- my $darch;
- while (<$dinfo>)
- {
- if (m/^DEFAULTBASE\s+(\S+)/)
- {
- $darch = $1;
- chomp($darch);
- last;
- }
- if (not $darch and m/^BASEARCHS\s+(\S+)/) {
- $darch = $1;
- }
- if (not $darch and m/^REPOID.*\/(\S+)/) {
- $darch = $1;
- }
- }
- close($dinfo);
- unless ($darch)
- {
- return;
- }
- my $dirh;
- opendir($dirh, $mntpath);
my $discnumber;
- my $totaldiscnumber;
- while (my $pname = readdir($dirh))
+ my $darch;
+ if (-r $mntpath . "/content")
{
- if ($pname =~ /media.(\d+)/)
+ my $dinfo;
+ open($dinfo, $mntpath . "/content");
+ my $darch;
+ while (<$dinfo>)
{
- $discnumber = $1;
- chomp($discnumber);
- my $mfile;
- open($mfile, $mntpath . "/" . $pname . "/media");
- <$mfile>;
- <$mfile>;
- $totaldiscnumber = <$mfile>;
- chomp($totaldiscnumber);
- close($mfile);
- open($mfile, $mntpath . "/" . $pname . "/products");
- my $prod = <$mfile>;
- close($mfile);
-
- if ($prod =~ m/SUSE-Linux-Enterprise-Server/ || $prod =~ m/SUSE-Linux-Enterprise-Software-Development-Kit/ || $prod =~ m/SLES/ || $prod =~ m/SDK/)
+ if (m/^DEFAULTBASE\s+(\S+)/)
{
- if (-f "$mntpath/content") {
- my $content;
- open($content, "<", "$mntpath/content");
- my @contents = <$content>;
- close($content);
- foreach (@contents) {
- if (/^VERSION/) {
- my @verpair = split /\s+|-/;
- $detdistname = "sles" . $verpair[1];
- unless ($distname) { $distname = $detdistname; }
- }
- unless ($distname) {
- if (/^DISTRO/ || /^LABEL/) {
+ $darch = $1;
+ chomp($darch);
+ last;
+ }
+ if (not $darch and m/^BASEARCHS\s+(\S+)/) {
+ $darch = $1;
+ }
+ if (not $darch and m/^REPOID.*\/(\S+)/) {
+ $darch = $1;
+ }
+ }
+ close($dinfo);
+ unless ($darch)
+ {
+ return;
+ }
- # only set to $1 if the regex was successful
- if ($_ =~ /sles:(\d+),/) {
- $distname = "sles" . $1;
- } elsif ($_ =~ /sles:(\d+):sp(\d+),/) {
- $distname = "sles" . $1 . "." . $2;
- } elsif ($_ =~ /Software Development Kit\s*(\d+)\s*SP(\d+)/) {
- $distname = "sles" . $1 . "." . $2;
- } elsif ($_ =~ /Software Development Kit\s*(\d+)/) {
- $distname = "sles" . $1;
- if ($_ =~ /sdk:(\d+):sp(\d+),/) {
+ my $dirh;
+ opendir($dirh, $mntpath);
+ my $totaldiscnumber;
+ while (my $pname = readdir($dirh))
+ {
+ if ($pname =~ /media.(\d+)/)
+ {
+ $discnumber = $1;
+ chomp($discnumber);
+ my $mfile;
+ open($mfile, $mntpath . "/" . $pname . "/media");
+ <$mfile>;
+ <$mfile>;
+ $totaldiscnumber = <$mfile>;
+ chomp($totaldiscnumber);
+ close($mfile);
+ open($mfile, $mntpath . "/" . $pname . "/products");
+ my $prod = <$mfile>;
+ close($mfile);
+
+ if ($prod =~ m/SUSE-Linux-Enterprise-Server/ || $prod =~ m/SUSE-Linux-Enterprise-Software-Development-Kit/ || $prod =~ m/SLES/ || $prod =~ m/SDK/)
+ {
+ if (-f "$mntpath/content") {
+ my $content;
+ open($content, "<", "$mntpath/content");
+ my @contents = <$content>;
+ close($content);
+ foreach (@contents) {
+ if (/^VERSION/) {
+ my @verpair = split /\s+|-/;
+ $detdistname = "sles" . $verpair[1];
+ unless ($distname) { $distname = $detdistname; }
+ }
+ unless ($distname) {
+ if (/^DISTRO/ || /^LABEL/) {
+
+ # only set to $1 if the regex was successful
+ if ($_ =~ /sles:(\d+),/) {
+ $distname = "sles" . $1;
+ } elsif ($_ =~ /sles:(\d+):sp(\d+),/) {
$distname = "sles" . $1 . "." . $2;
+ } elsif ($_ =~ /Software Development Kit\s*(\d+)\s*SP(\d+)/) {
+ $distname = "sles" . $1 . "." . $2;
+ } elsif ($_ =~ /Software Development Kit\s*(\d+)/) {
+ $distname = "sles" . $1;
+ if ($_ =~ /sdk:(\d+):sp(\d+),/) {
+ $distname = "sles" . $1 . "." . $2;
+ }
}
}
}
}
+ } else {
+ my @parts = split /\s+/, $prod;
+ my @subparts = split /-/, $parts[2];
+ $detdistname = "sles" . $subparts[0];
+ unless ($distname) { $distname = "sles" . $subparts[0] }
}
- } else {
- my @parts = split /\s+/, $prod;
- my @subparts = split /-/, $parts[2];
- $detdistname = "sles" . $subparts[0];
- unless ($distname) { $distname = "sles" . $subparts[0] }
- }
- if ($prod =~ m/Software-Development-Kit/ || $prod =~ m/SDK/) {
- #
- # It's been seen that the 3rd disc on the SDK ISO images are using 'media.1' instead of
- # media.3 to represent the 3rd disc. This code here is to work around this issue. I'm not
- # sure why this only applies to sles 11.3 since I do see the same issue in sles 11. But will
- # keep the logic as is... checking for >= 11.3
- #
- (my $numver = $distname) =~ s/[^0-9]//g;
- if ($numver >= 11.3) {
- if ($discnumber == 1 and $totaldiscnumber == 1) { #disc 3, aka disc1 of 'debug'
- $discnumber = 3;
+ if ($prod =~ m/Software-Development-Kit/ || $prod =~ m/SDK/) {
+ #
+ # It's been seen that the 3rd disc on the SDK ISO images are using 'media.1' instead of
+ # media.3 to represent the 3rd disc. This code here is to work around this issue. I'm not
+ # sure why this only applies to sles 11.3 since I do see the same issue in sles 11. But will
+ # keep the logic as is... checking for >= 11.3
+ #
+ (my $numver = $distname) =~ s/[^0-9]//g;
+ if ($numver >= 11.3) {
+ if ($discnumber == 1 and $totaldiscnumber == 1) { #disc 3, aka disc1 of 'debug'
+ $discnumber = 3;
+ }
}
+ $discnumber = 'sdk' . $discnumber;
}
- $discnumber = 'sdk' . $discnumber;
+
+ # check media.1/products for text.
+ # the cselx is a special GE built version.
+ # openSUSE is the normal one.
+ } elsif ($prod =~ m/cselx 1.0-0|openSUSE 11.1-0/) {
+ $distname = "suse11";
+ $detdistname = "suse11";
}
-
- # check media.1/products for text.
- # the cselx is a special GE built version.
- # openSUSE is the normal one.
- } elsif ($prod =~ m/cselx 1.0-0|openSUSE 11.1-0/) {
- $distname = "suse11";
- $detdistname = "suse11";
+
}
-
+ }
+
+ closedir($dirh);
+ } elsif (-r $mntpath . "/media.1/media") {
+ my $dinfo;
+ open($dinfo, $mntpath . "/media.1/media");
+ my $dsc = <$dinfo>;
+ if ($dsc =~ /x86_64/) {
+ $darch = "x86_64";
+ }
+ if ($dsc =~ /Installer/ and $dsc =~ /SLE-15/) {
+ $discnumber = 1;
+ unless ($distname) { $distname = "sle15" };
+ } elsif ($dsc =~ /SLE-15/ and $dsc =~ /Packages/) {
+ $discnumber = 2;
+ unless ($distname) { $distname = "sle15" };
}
}
- closedir($dirh);
-
+
unless ($distname and $discnumber)
{
#failed to parse the disc info
diff --git a/xCAT-server/share/xcat/install/scripts/pre.sle15 b/xCAT-server/share/xcat/install/scripts/pre.sle15
new file mode 100644
index 000000000..127742a60
--- /dev/null
+++ b/xCAT-server/share/xcat/install/scripts/pre.sle15
@@ -0,0 +1,165 @@
+
+
+
diff --git a/xCAT-server/share/xcat/install/sles/compute.sle15.pkglist b/xCAT-server/share/xcat/install/sles/compute.sle15.pkglist
new file mode 100644
index 000000000..2933f493c
--- /dev/null
+++ b/xCAT-server/share/xcat/install/sles/compute.sle15.pkglist
@@ -0,0 +1,2 @@
+openssl
+rsync
diff --git a/xCAT-server/share/xcat/install/sles/compute.sle15.tmpl b/xCAT-server/share/xcat/install/sles/compute.sle15.tmpl
new file mode 100644
index 000000000..733c59eaf
--- /dev/null
+++ b/xCAT-server/share/xcat/install/sles/compute.sle15.tmpl
@@ -0,0 +1,102 @@
+
+
+
+
+
+ true
+ true
+
+ false
+ false
+ mbr
+
+
+
+ GMT
+ #TABLE:site:key=timezone:value#
+
+
+ english-us
+
+ en_US
+
+ false
+ false
+ false
+ true
+
+
+ non
+
+
+ true
+ true
+ true
+
+
+
+
+
+ XCATPARTITIONHOOK
+ true
+
+
+
+
+
+
+ http://XCATNEXTSERVERHOOK/install/sles15/x86_64/2sle-module-basesystem/Module-Basesystem
+ http://XCATNEXTSERVERHOOK/install/sles15/x86_64/2sle-module-hpc/Module-HPC
+ http://XCATNEXTSERVERHOOK/install/sles15/x86_64/2sle-module-server-applications/Module-Server-Applications
+ http://XCATNEXTSERVERHOOK/install/sles15/x86_64/2sle-module-server-applications/Module-Server-Applications
+ http://XCATNEXTSERVERHOOK/install/sles15/x86_64/2SLE_HPC/Product-HPC
+
+
+
+
+ SLE_HPC
+
+
+ #INCLUDE_DEFAULT_PTRNLIST_S#
+
+
+ #INCLUDE_DEFAULT_PKGLIST_S#
+
+
+
+
+
+
+ root
+ #CRYPT:passwd:key=system,username=root:password#
+ true
+
+
+
+
+
+
+ true
+ true
+ local
+ linux
+
+
+
+ dhcp
+ eth0
+ onboot
+
+
+
+ false
+
+
+
+
+ #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.sle15#
+ #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/chroot.sles#
+ #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.sles11#
+
+
+
diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell
index acbde36eb..a0b8e42b2 100755
--- a/xCAT/postscripts/remoteshell
+++ b/xCAT/postscripts/remoteshell
@@ -60,7 +60,7 @@ then
echo "MaxStartups 1024" >>/etc/ssh/sshd_config
if [ "$SETUPFORPCM" = "1" ]; then
- if [[ $OSVER == sles* ]];then
+ if [[ $OSVER == sle* ]];then
sed -i '/PasswordAuthentication /'d /etc/ssh/sshd_config
echo "PasswordAuthentication yes" >>/etc/ssh/sshd_config
elif [[ $OSVER == ubuntu* ]];then