Changeset c3a3fe3 for fedkit


Ignore:
Timestamp:
Feb 15, 2010 8:51:46 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
6a8a9ec
Parents:
3132419
Message:

Coordinate parallel starts: wait for remote nodes to configure ssh for access

Location:
fedkit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fedkit/active_config.pl

    r3132419 rc3a3fe3  
    4848gateway_lib::wait_for_port($peer, 22, 60*60) ||
    4949    die "ssh never came up on $peer\n";
     50print "Making sure ssh permissions are reset\n";
     51gateway_lib::testcmd_repeat("$ssh -o \"StrictHostKeyChecking no\" " .
     52    "-i $ssh_privkey $peer ls", 5*60);
    5053
    5154while (<$f>) {
  • fedkit/gateway_lib.pm

    r3132419 rc3a3fe3  
    339339}
    340340
     341sub testcmd_repeat {
     342    my($cmd, $timeout, $sleep) = @_;
     343    my $start = time();
     344    $sleep = 5 unless $sleep;
     345
     346    while (1) {
     347        system("$cmd");
     348        if ($?) {
     349            if ($timeout and time() - $start > $timeout) {
     350                return undef;
     351            }
     352            else { sleep($sleep); }
     353        }
     354        else { return 1; }
     355    }
     356}
    341357
    3423581;
Note: See TracChangeset for help on using the changeset viewer.