From 2b3f8e424f2f3f417702ae31e6857f8d2b572adc Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 22 Jan 2018 10:35:41 -0500 Subject: [PATCH] Restore classic nodeset arguments People are opting into the classic arguments, continue helping them so long as it works. --- xCAT-server/lib/xcat/plugins/anaconda.pm | 25 ++++++++++++++++++------ xCAT-server/lib/xcat/plugins/sles.pm | 24 +++++++++++++++++------ 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 648447cbf..0195ffe16 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -336,9 +336,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}; @@ -1074,9 +1080,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}; diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index b8bcc50c1..13e7621b3 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -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}; @@ -875,10 +882,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};