From fcf725f88dd2f9d10210ecedee9c82bfe4ce4ec2 Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 28 Aug 2012 11:39:41 +0000 Subject: [PATCH] updatenode performance enhancement. 1, tar the postscripts for xcatdsklspost git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13625 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/updatenode.pm | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index d428efd63..420954616 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -740,6 +740,17 @@ sub updatenode xCAT::MsgUtils->message("E", $rsp, $callback); } + + $cmd="cd $postscripts;tar -czf $postscripts.tgz ."; #print "cmd:$cmd\n"; + xCAT::Utils->runcmd($cmd, 0); + $rsp = {}; + if ($::RUNCMD_RC != 0) + { + $rsp->{data}->[0] = "$cmd failed.\n"; + xCAT::MsgUtils->message("E", $rsp, $callback); + } + + } @@ -1284,6 +1295,19 @@ $AIXnodes_nd, $subreq ) != 0 ) { } } + if (-e "$postscripts.tgz") { + + $cmd="rm $postscripts.tgz"; print "cmd:$cmd\n"; + xCAT::Utils->runcmd($cmd, 0); + $rsp = {}; + if ($::RUNCMD_RC != 0) + { + $rsp->{data}->[0] = "$cmd failed.\n"; + xCAT::MsgUtils->message("E", $rsp, $callback); + } + + } + return 0; }