2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 19:22:05 +00:00

Restore classic nodeset arguments

People are opting into the classic arguments, continue helping them so
long as it works.
This commit is contained in:
Jarrod Johnson 2018-01-22 10:35:41 -05:00
parent 4b73e824a9
commit a39707fa94
2 changed files with 37 additions and 12 deletions

View File

@ -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,16 @@ 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};

View File

@ -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,10 +856,15 @@ 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};