From 0e9d55a8c309b7f5d47aafb83da2ebd7296b5450 Mon Sep 17 00:00:00 2001 From: sakolish Date: Tue, 6 May 2008 12:34:28 +0000 Subject: [PATCH] Fixed broken dependency table support git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1284 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/blade.pm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/blade.pm b/xCAT-server-2.0/lib/xcat/plugins/blade.pm index 49482d390..453110ebd 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/blade.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/blade.pm @@ -13,7 +13,7 @@ my %mm_comm_pids; use XML::Simple; if ($^O =~ /^linux/i) { - $XML::Simple::PREFERRED_PARSER='XML::Parser'; + $XML::Simple::PREFERRED_PARSER='XML::Parser'; } use Data::Dumper; use POSIX "WNOHANG"; @@ -1114,11 +1114,17 @@ sub handle_depend { my $callback = shift; my $doreq = shift; my $dep = shift; + my %req; my %node = (); # send all dependencies (along w/ those dependent on nothing) - $request->{node} = [keys %$dep]; - process_request($request,$callback,$doreq,1); + $req{node} = [keys %$dep]; + $req{arg} = [$request->{arg}]; + $req{command} = [$request->{command}->[0]]; + + foreach (@{preprocess_request(\%req,$callback)}) { + process_request(\%$_,$callback,$doreq,1); + } my $start = Time::HiRes::gettimeofday(); # build list of dependent nodes w/delays @@ -1307,7 +1313,9 @@ sub process_request { my $moreinfo=$request->{moreinfo}; if ($command eq "rpower" and grep(/^on|off|boot|reset|cycle$/, @exargs)) { - if (!grep /^--nodeps$/, @exargs) { + if ( my ($index) = grep($exargs[$_]=~ /^--nodeps$/, 0..$#exargs )) { + splice(@exargs, $index, 1); + } else { # handles 1 level of dependencies only if (!defined($level)) { my $dep = build_depend($noderange,\@exargs); @@ -1926,4 +1934,3 @@ sub dompa { -