From 017a1526edb5cfc7985455a7c9feb9129358ba66 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 31 Jan 2012 14:19:53 +0000 Subject: [PATCH] Add a feature for xCATd to delay subrequests as dictated by plugin preprocess_request git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11439 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index e7e373d4d..924840247 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1326,6 +1326,7 @@ sub dispatch_request { } if ($onlyone and not ($_->{'_xcatdest'} and xCAT::Utils->thishostisnot($_->{'_xcatdest'}))) { $SIG{CHLD}='DEFAULT'; + if ($_->{'_xcatdelay'}) { sleep $_->{'_xcatdelay'}; } ${"xCAT_plugin::".$modname."::"}{process_request}->($_,$dispatch_cb,\&do_request); return; } @@ -1355,6 +1356,7 @@ sub dispatch_request { $dispatch_parentfd = $parfd; my @prexcatdests=(); my @xcatdests=(); + if ($_->{'_xcatdelay'}) { sleep $_->{'_xcatdelay'}; } if (ref($_->{'_xcatdest'}) eq 'ARRAY') { #If array, consider it an 'anycast' operation, broadcast done through dupe #requests, or an alternative join '&' maybe? @prexcatdests=@{$_->{'_xcatdest'}};