diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 5b780080e..00cacd4b2 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,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 fe288bd0f..b9ce11f56 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}; @@ -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};