From 24a734e996c818eaf8fcd348cae6587362141e69 Mon Sep 17 00:00:00 2001 From: lissav Date: Sun, 5 Apr 2009 12:18:17 +0000 Subject: [PATCH] fix for tracker defect 2728852, xdsh -K only updating the first node on the list git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3095 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DSHCLI.pm | 8 ++++---- perl-xCAT/xCAT/Utils.pm | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index f353b668a..9b2fa2f86 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -3785,9 +3785,9 @@ sub parse_and_run_dsh } - # Rules: if (current userid running command) not eq touserid, - # the current running userid must be root - # + # IF using the xdsh -K -l option then we are setting up the + # --devicetype. xdsh -K -l is not allowed for users. + # This is checked for in the client code. # DSH_REMOTE_PASSWORD env variable must be set to the correct # password for the key update. This was setup in xdsh client # frontend. remoteshell.expect depends on this @@ -3860,7 +3860,7 @@ sub parse_and_run_dsh # # setup ssh keys on the nodes or ib switch # - my $rc = xCAT::Utils->setupSSH(@nodelist); + my $rc = xCAT::Utils->setupSSH($options{'nodes'}); my @results = "return code = $rc"; return (@results); } diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index addbd5691..8c45d016f 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -1110,7 +1110,8 @@ sub setupSSH my ($class, $ref_nodes) = @_; my @nodes = $ref_nodes; my @badnodes = (); - my $n_str = join ',', @nodes; + #my $n_str = join ',', @nodes; + my $n_str = $nodes[0]; my $SSHdir = "/install/postscripts/_ssh"; if (!($ENV{'DSH_REMOTE_PASSWORD'})) { @@ -1282,7 +1283,8 @@ rmdir \"/tmp/$to_userid\""; } # must always check to see if worked, run test - foreach my $n (@nodes) + my @testnodes= split(",", $nodes[0]); + foreach my $n (@testnodes) { my $cmd = "$::REMOTESHELL_EXPECT -t $::REMOTE_SHELL $n "; my @cmdout = `$cmd 2>&1`;