remove internal callback funciton sub updatenode_cb, will use --nodestatus

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14199 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2012-11-01 12:54:08 +00:00
parent 90be98a1b7
commit 199416eb0a

View File

@ -593,6 +593,7 @@ sub preprocess_updatenode
{
# TODO fix the error handling, right now cause inf loop
# should use the new --nodestatus capability
# when getdata and updatenode_cb are registered LKV
# if ( $::SECURITY
# && !(grep /^$s1$/, @::good_sns) # is it good
@ -866,42 +867,6 @@ sub security_update_sshkeys
return;
}
#--------------------------------------------------------------------------------
=head3 updatenode_cb
A callback function which is used to handle the output of updatenode function
when run updatenode --secruity for service node inside
=cut
#-----------------------------------------------------------------------------
sub updatenode_cb
{
my $resp = shift;
# call the original callback function
$::CALLBACK->($resp);
foreach my $line (@{$resp->{data}})
{
my $node;
my $msg;
if ($line =~ /(.*):(.*)/)
{
$node = $1;
$msg = $2;
}
if ($msg =~ /Redeliver security files has completed/)
{
push @{$::NODEOUT->{$node}}, "ps ok";
}
elsif ($msg =~ /Setup ssh keys has completed/)
{
push @{$::NODEOUT->{$node}}, "ssh ok";
}
}
}
#--------------------------------------------------------------------------------