Fix one bug: after discovery stopped, we can still discover some nodes

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14104 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
leiaibj 2012-10-24 07:14:11 +00:00
parent 1c32268e9b
commit 50352afb39

View File

@ -741,8 +741,8 @@ sub nodediscoverstart{
}
# Read DB to confirm the discover is not started yet.
my @sitevalues = xCAT::TableUtils->get_site_attribute("__PCMDiscover");
if ($sitevalues[0]){
my $discover_running = xCAT::ProfiledNodeUtils->is_discover_started();
if ($discover_running){
setrsp_errormsg("Profiled nodes discovery already started.");
return;
}
@ -775,8 +775,8 @@ sub nodediscoverstart{
sub nodediscoverstop{
# Read DB to confirm the discover is started.
xCAT::MsgUtils->message("Stopping profiled node's discover.");
my @sitevalues = xCAT::TableUtils->get_site_attribute("__PCMDiscover");
if (! $sitevalues[0]){
my $discover_running = xCAT::ProfiledNodeUtils->is_discover_started();
if (! $discover_running){
setrsp_errormsg("Profiled nodes discovery not started yet.");
return;
}
@ -830,9 +830,8 @@ sub nodediscoverstatus{
#-------------------------------------------------------
sub nodediscoverls{
# Read DB to confirm the discover is started.
my @sitevalues = ();
@sitevalues = xCAT::TableUtils->get_site_attribute("__PCMDiscover");
if (! $sitevalues[0]){
my $discover_running = xCAT::ProfiledNodeUtils->is_discover_started();
if (! $discover_running){
setrsp_errormsg("Profiled nodes discovery not started yet.");
return;
}
@ -889,7 +888,7 @@ sub findme{
xCAT::MsgUtils->message('S', "Profield nodes discover: Start.\n");
# Read DB to confirm the discover is started.
my @sitevalues = xCAT::TableUtils->get_site_attribute("__PCMDiscover");
if (! @sitevalues){
if (! $sitevalues[0]){
setrsp_errormsg("Profiled nodes discovery not started yet.");
return;
}