From c3381461dae75b3068a04e3180b8af9f474260a2 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 7 Dec 2012 13:15:32 +0000 Subject: [PATCH] add updatestatus for updatenode -S on AIX nodes git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14585 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/updatenode.pm | 90 ++++++++-------------- 1 file changed, 32 insertions(+), 58 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 447114cde..a885d830d 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -2738,42 +2738,27 @@ sub updateAIXsoftware if ($::VERBOSE) { my $rsp; - push @{$rsp->{data}}, "Running: \'$inpcmd\'.\n"; + push @{$rsp->{data}}, "Running: xdsh -s -v \'$inpcmd\'.\n"; xCAT::MsgUtils->message("I", $rsp, $callback); } - my $output = - xCAT::Utils->runxcmd( - { - command => ["xdsh"], - node => \@nodes, - arg => [$inpcmd] - }, - $subreq, -1, 1 - ); + my $args1 = [ + "--nodestatus", + "-s", + "-v", + "$inpcmd" + ]; - if ($::RUNCMD_RC != 0) - { - my $rsp; - push @{$rsp->{data}}, - "Could not run installp command: \'$inpcmd\'.\n"; - foreach my $o (@$output) - { - push @{$rsp->{data}}, "$o"; - } - xCAT::MsgUtils->message("I", $rsp, $callback); - $error++; + $subreq->( + { + command => ["xdsh"], + node => \@nodes, + arg => $args1, + _xcatpreprocessed => [1] + }, + \&getdata2 + ); - } - elsif ($::VERBOSE) - { - my $rsp; - foreach my $o (@$output) - { - push @{$rsp->{data}}, "$o"; - } - xCAT::MsgUtils->message("I", $rsp, $callback); - } } # @@ -2959,36 +2944,25 @@ sub updateAIXsoftware push @{$rsp->{data}}, "Running: \'$rcmd\'.\n"; xCAT::MsgUtils->message("I", $rsp, $callback); } + # install the rpms + my $args1 = [ + "--nodestatus", + "-s", + "-v", + "$rcmd" + ]; - my $output = - xCAT::Utils->runxcmd( - {command => ["xdsh"], node => \@nodes, arg => [$rcmd]}, - $subreq, -1, 1); + $subreq->( + { + command => ["xdsh"], + node => \@nodes, + arg => $args1, + _xcatpreprocessed => [1] + }, + \&getdata2 + ); - if (($::RUNCMD_RC != 0) && (!$::ALLSW)) - { - my $rsp; - push @{$rsp->{data}}, "Could not install RPMs.\n"; - foreach my $o (@$output) - { - push @{$rsp->{data}}, "$o"; - } - xCAT::MsgUtils->message("I", $rsp, $callback); - $error++; - } - elsif ($::VERBOSE) - { - # should we always give output?? - # could get gobs of unwanted output in some cases - my $rsp; - push @{$rsp->{data}}, "Command output:\n"; - foreach my $o (@$output) - { - push @{$rsp->{data}}, "$o"; - } - xCAT::MsgUtils->message("I", $rsp, $callback); - } } }