diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 6fe41a86e..088bd09ac 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -4370,7 +4370,7 @@ sub process_request { } } if ($request->{command}->[0] eq "findme") { - if (defined($request->{discoverymethod}) and defined($request->{discoverymethod}->[0])) { + if (defined($request->{discoverymethod}) and defined($request->{discoverymethod}->[0]) and ($request->{discoverymethod}->[0] ne 'undef')) { # The findme request had been processed by other module, just return return; } diff --git a/xCAT-server/lib/xcat/plugins/hpblade.pm b/xCAT-server/lib/xcat/plugins/hpblade.pm index 6328f8b95..e6cd569ff 100755 --- a/xCAT-server/lib/xcat/plugins/hpblade.pm +++ b/xCAT-server/lib/xcat/plugins/hpblade.pm @@ -685,7 +685,7 @@ sub process_request { } } if ($request->{command}->[0] eq "findme") { - if (defined($request->{discoverymethod}) and defined($request->{discoverymethod}->[0])) { + if (defined($request->{discoverymethod}) and defined($request->{discoverymethod}->[0]) and ($request->{discoverymethod}->[0] ne 'undef')) { # The findme request had been processed by other module, just return return; } diff --git a/xCAT-server/lib/xcat/plugins/profilednodes.pm b/xCAT-server/lib/xcat/plugins/profilednodes.pm index 242216f82..54ca1f3ca 100644 --- a/xCAT-server/lib/xcat/plugins/profilednodes.pm +++ b/xCAT-server/lib/xcat/plugins/profilednodes.pm @@ -1816,7 +1816,7 @@ Usage: #------------------------------------------------------- sub findme{ - if (defined($request->{discoverymethod}) and defined($request->{discoverymethod}->[0])) { + if (defined($request->{discoverymethod}) and defined($request->{discoverymethod}->[0]) and ($request->{discoverymethod}->[0] ne 'undef')) { # The findme request had been processed by other module, just return return; } diff --git a/xCAT-server/lib/xcat/plugins/seqdiscovery.pm b/xCAT-server/lib/xcat/plugins/seqdiscovery.pm index 87d1d5281..96735ecf2 100755 --- a/xCAT-server/lib/xcat/plugins/seqdiscovery.pm +++ b/xCAT-server/lib/xcat/plugins/seqdiscovery.pm @@ -54,7 +54,7 @@ sub findme { my @SEQdiscover = xCAT::TableUtils->get_site_attribute("__SEQDiscover"); my @PCMdiscover = xCAT::TableUtils->get_site_attribute("__PCMDiscover"); - if (defined($request->{discoverymethod}) and defined($request->{discoverymethod}->[0])) { + if (defined($request->{discoverymethod}) and defined($request->{discoverymethod}->[0]) and ($request->{discoverymethod}->[0] ne 'undef')) { # The findme request had been processed by other module, just return return; } diff --git a/xCAT-server/lib/xcat/plugins/switch.pm b/xCAT-server/lib/xcat/plugins/switch.pm index 12024e6d1..c23543255 100644 --- a/xCAT-server/lib/xcat/plugins/switch.pm +++ b/xCAT-server/lib/xcat/plugins/switch.pm @@ -268,7 +268,7 @@ sub process_request { } return; } elsif ($req->{command}->[0] eq 'findme') { - if (defined($req->{discoverymethod}) and defined($req->{discoverymethod}->[0])) { + if (defined($req->{discoverymethod}) and defined($req->{discoverymethod}->[0]) and ($req->{discoverymethod}->[0] ne 'undef')) { # The findme request had been processed by other module, just return return; } diff --git a/xCAT-server/lib/xcat/plugins/typemtms.pm b/xCAT-server/lib/xcat/plugins/typemtms.pm index 53e5cc29d..8a9b350f4 100644 --- a/xCAT-server/lib/xcat/plugins/typemtms.pm +++ b/xCAT-server/lib/xcat/plugins/typemtms.pm @@ -57,7 +57,7 @@ sub process_request { my $cb = shift; my $doreq = shift; if ($req->{command}->[0] eq 'findme') { - if (defined($req->{discoverymethod}) and defined($req->{discoverymethod}->[0])) { + if (defined($req->{discoverymethod}) and defined($req->{discoverymethod}->[0]) and ($req->{discoverymethod}->[0] ne 'undef')) { # The findme request had been processed by other module, just return return; } diff --git a/xCAT-server/lib/xcat/plugins/zzzdiscovery.pm b/xCAT-server/lib/xcat/plugins/zzzdiscovery.pm index 643b178c8..a39f2344f 100644 --- a/xCAT-server/lib/xcat/plugins/zzzdiscovery.pm +++ b/xCAT-server/lib/xcat/plugins/zzzdiscovery.pm @@ -18,7 +18,7 @@ sub process_request { my $doreq = shift; if ($req->{command}->[0] eq 'findme') { xCAT::MsgUtils->message("S", "xcat.discovery.zzzdiscovery: ($req->{mtm}->[0]*$req->{serial}->[0]) Finish to process the discovery request"); - if (!defined($req->{discoverymethod}) or !defined($req->{discoverymethod}->[0])) { + if (!defined($req->{discoverymethod}) or !defined($req->{discoverymethod}->[0]) or ($req->{discoverymethod}->[0] eq 'undef')) { my $rsp = {}; $rsp->{error}->[0] = "The discovery request can not be processed"; $cb->($rsp);