From bd8f5021f5a1706edb228c805ad74faa55e61246 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Fri, 12 Apr 2013 08:11:39 +0000 Subject: [PATCH] Change the collaboration with sequential discovery for the output of nodediscover* message git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15966 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/profilednodes.pm | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/profilednodes.pm b/xCAT-server/lib/xcat/plugins/profilednodes.pm index 6e0a6c299..baa5813ca 100644 --- a/xCAT-server/lib/xcat/plugins/profilednodes.pm +++ b/xCAT-server/lib/xcat/plugins/profilednodes.pm @@ -241,18 +241,21 @@ sub validate_args{ if ($mandatoryparamsref){ @mandatoryparams = @$mandatoryparamsref; } - my $profiledis; - foreach (@mandatoryparams){ - if (exists($args_dict{$_})) { - # this is for profile discovery - $profiledis = 1; - last; + + if (@mandatoryparams) { + my $profiledis; + foreach (@mandatoryparams){ + if (exists($args_dict{$_})) { + # this is for profile discovery + $profiledis = 1; + last; + } + } + unless ($profiledis) { + # Not see the nodrange and 'networkprofile', 'imageprofile', 'hostnameformat' + # return to make sequential discovery to display help message + return 0; } - } - unless ($profiledis) { - # Not see the nodrange and 'networkprofile', 'imageprofile', 'hostnameformat' - # return to make sequential discovery to display help message - return 0; } foreach (@mandatoryparams){ @@ -1135,6 +1138,13 @@ Usage: } } + # Check the running of sequential discovery + my @PCMdiscover = xCAT::TableUtils->get_site_attribute("__SEQDiscover"); + if ($PCMdiscover[0]) { + setrsp_errormsg("Profile Discovery cannot be run together with Sequential discovery."); + return; + } + # Read DB to confirm the discover is not started yet. my $discover_running = xCAT::ProfiledNodeUtils->is_discover_started(); if ($discover_running){