From b4f5b6d1966d5f46194419e417af3aabfbc75612 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 3 Feb 2012 13:27:19 +0000 Subject: [PATCH] add missing checks in preproces_request that we have already been there git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11465 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 7 +++++++ xCAT-server/lib/xcat/plugins/hpblade.pm | 8 +++++++- xCAT-server/lib/xcat/plugins/vsmppxe.pm | 7 +++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index e703aeded..d81602b0c 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -134,6 +134,13 @@ sub handled_commands{ sub preprocess_request { my $request = shift; my $callback = shift; + #if already preprocessed, go straight to request + if ( (defined($request->{_xcatpreprocessed})) + && ($request->{_xcatpreprocessed}->[0] == 1)) + { + return [$request]; + } + my $username = 'root'; my $password = ''; my $vusername = "Administrator"; diff --git a/xCAT-server/lib/xcat/plugins/hpblade.pm b/xCAT-server/lib/xcat/plugins/hpblade.pm index 59ae70e82..4f995cf52 100755 --- a/xCAT-server/lib/xcat/plugins/hpblade.pm +++ b/xCAT-server/lib/xcat/plugins/hpblade.pm @@ -292,7 +292,13 @@ sub gethpbladecons { sub preprocess_request { my $request = shift; - if ($request->{_xcatdest}) { return [$request]; } #exit if preprocessed + #if ($request->{_xcatdest}) { return [$request]; } #exit if preprocessed + if ( (defined($request->{_xcatpreprocessed})) + && ($request->{_xcatpreprocessed}->[0] == 1)) + { + return [$request]; + } + my $callback=shift; my @requests; diff --git a/xCAT-server/lib/xcat/plugins/vsmppxe.pm b/xCAT-server/lib/xcat/plugins/vsmppxe.pm index 764acf08a..2e884717b 100644 --- a/xCAT-server/lib/xcat/plugins/vsmppxe.pm +++ b/xCAT-server/lib/xcat/plugins/vsmppxe.pm @@ -196,8 +196,15 @@ sub pass_along { sub preprocess_request { #Assume shared tftp directory for boring people, but for cool people, help sync up tftpdirectory contents when #they specify no sharedtftp in site table + my $stab = xCAT::Table->new('site'); my $req = shift; + if ( (defined($req->{_xcatpreprocessed})) + && ($req->{_xcatpreprocessed}->[0] == 1)) + { + return [$req]; + } + my $callback1 = shift; my $command = $req->{command}->[0]; my $sub_req = shift;