Changeset 33e3537


Ignore:
Timestamp:
Apr 11, 2008 2:12:04 PM (17 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
2396559e
Parents:
8034579
Message:

events to both federants - start repeaters on both sides of the gateway

Location:
fedkit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fedkit/fed-tun.pl

    r8034579 r33e3537  
    3535my $PUBSUB_PORT = 16505;
    3636
     37
     38my $remote_pubsub_port = $PUBSUB_PORT - 1;  # There will be a local
     39                                            # pubsubd running, so we
     40                                            # dodge the port on the
     41                                            # remote tunnel node.
    3742sub setup_bridging;
    3843sub setup_tunnel_cfg;
     
    108113
    109114    if (defined($opts{'bossname'})) {
    110         my $remote_pubsub_port = $PUBSUB_PORT - 1;  # There will be a local
    111                                                     # pubsubd running, so we
    112                                                     # dodge the port on the
    113                                                     # remote tunnel node.
    114115        $ssh_port_fwds .= "-R :$TMCD_PORT:$opts{'bossname'}:$TMCD_PORT ";
     116    }
     117
     118    if (defined($opts{'eventservername'})) {
    115119        $ssh_port_fwds .= "-R :$remote_pubsub_port:$opts{'eventservername'}:" .
    116120            "$PUBSUB_PORT ";
     121    }
     122    if (defined($opts{'remoteeventservername'})) {
     123        $ssh_port_fwds .= "-L :$remote_pubsub_port:" .
     124            "$opts{'remoteeventservername'}:$PUBSUB_PORT ";
    117125    }
    118126
     
    195203    }
    196204    close(IFFILE);
     205
     206    # Start a local event repeater (unless we're missing parameters
     207    die "Missing event repeater params (No config file ?)\n"
     208        unless $event_repeater && $opts{'remoteexperiment'} &&
     209        $opts{'localexperiment'};
     210
     211    print "Starting event repeater\n" if $debug;
     212   
     213    print("$event_repeater -M -P $remote_pubsub_port -S localhost " .
     214        "-E $opts{'remoteexperiment'} -e $opts{'localexperiment'}\n")
     215        if $debug;
     216    # Connect to the forwarded pubsub port on this host to listen to the
     217    # other experiment's events, and to the local experiment to forward
     218    # events.
     219    system("$event_repeater -M -P $remote_pubsub_port -S localhost " .
     220        "-E $opts{'remoteexperiment'} -e $opts{'localexperiment'}");
     221    warn "Event repeater returned $?\n" if $?;
    197222} elsif ($remote) {
    198223    # We're on the remote system;  figure out which interface to
  • fedkit/splitter.pl

    r8034579 r33e3537  
    649649            $tbparams->{$master}->{'eventserver'} . 
    650650            $tbparams->{$master}->{'domain'};
     651        my $remote_event_server =               # Slave event-server (FQDN)
     652            $tbparams->{$dtb}->{'eventserver'} . 
     653            $tbparams->{$dtb}->{'domain'};
    651654        my $remote_script_dir =                 # Remote fed script location
    652655            "/proj/" . $dproject . "/exp/$eid/tmp";
     
    688691        print $gwconfig "FsName: $fs\n";
    689692        print $gwconfig "EventServerName: $event_server\n";
     693        print $gwconfig "RemoteEventServerName: $remote_event_server\n";
    690694        print $gwconfig "Type: $type\n";
    691695        print $gwconfig "RemoteScriptDir: $remote_script_dir\n";
Note: See TracChangeset for help on using the changeset viewer.