Author: spadkins
Date: Fri Jun 30 07:01:52 2006
New Revision: 6585
Modified:
p5ee/trunk/App-Context/lib/App/Context/ClusterController.pm
Log:
permit ssh errors to get into the controller log
Modified: p5ee/trunk/App-Context/lib/App/Context/ClusterController.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Context/ClusterController.pm (original)
+++ p5ee/trunk/App-Context/lib/App/Context/ClusterController.pm Fri Jun 30
07:01:52 2006
@@ -315,16 +315,18 @@
}
my ($msg, $host, $port, $cmd);
- my $cmd_fmt = $self->{options}{"app.context.node_start_cmd"} || "ssh %s
'mvnode --port=%s > /dev/null 2>&1 &'";
+ my $cmd_fmt = $self->{options}{"app.context.node_start_cmd"} || "ssh -f
{host} mvnode --port={port}";
foreach my $node (keys %{$self->{node}}) {
$msg = $self->send_message($node, undef, "CONTROLLER-UP:", 0, undef,
1);
if ($msg =~ /ERROR:/) {
if ($node =~ /^([^:]+):([0-9]+)$/) {
$host = $1;
$port = $2;
- $cmd = sprintf($cmd_fmt, $host, $port);
+ $cmd = $cmd_fmt;
+ $cmd =~ s/{host}/$host/g;
+ $cmd =~ s/{port}/$port/g;
$self->log("Starting Node [$node]: [$cmd]\n");
- system("nohup $cmd < /dev/null > /dev/null 2>&1 &");
+ system("$cmd < /dev/null &");
}
}
}