- Timestamp:
- Apr 10, 2008 5:00:03 PM (17 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- 33e3537
- Parents:
- f64fa81
- Location:
- fedkit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fedkit/fed-tun.pl
rf64fa81 r8034579 61 61 my $ssh_port_fwds = ""; 62 62 my $remote_script_dir; # location of the other sides fed-tun.pl 63 my $event_repeater; # The pathname of the event repeater 64 my $remote_config_file; # Config file for the other side 63 65 64 66 if ($#ARGV != 0 && !getopts('df:r', \%opts)) { … … 97 99 $type =~ tr/A-Z/a-z/; 98 100 $remote_script_dir = $opts{'remotescriptdir'} || "."; 101 $event_repeater = $opts{'eventrepeater'}; 102 $remote_config_file = $opts{'remoteconfigfile'}; 103 $remote_config_file = "-f $remote_config_file" if $remote_config_file; 99 104 100 105 if (defined($opts{'fsname'})) { … … 179 184 # the expected single line of output when the tunnel is connected. 180 185 181 open($SSHCMD[$count], "$SSH -w $count:$count $ssh_port_fwds -o \"StrictHostKeyChecking no\" $opts{'peer'} \"$remote_script_dir/fed-tun.pl -r $addr $count\" |") or die "Failed to run ssh"; 186 print "$SSH -w $count:$count $ssh_port_fwds -o \"StrictHostKeyChecking no\" $opts{'peer'} \"$remote_script_dir/fed-tun.pl $remote_config_file -r $addr $count\"\n" if $debug; 187 open($SSHCMD[$count], "$SSH -w $count:$count $ssh_port_fwds -o \"StrictHostKeyChecking no\" $opts{'peer'} \"$remote_script_dir/fed-tun.pl $remote_config_file -r $addr $count\" |") or die "Failed to run ssh"; 182 188 183 189 my $check = <$SSHCMD[$count]>; # Make sure something ran... … … 210 216 &setup_bridging($tun, $bridge, $iface, $addr); 211 217 print "Remote connection all set up!\n"; # Trigger other end with output 218 219 # If this is the first remote invocation on a control gateway, start the 220 # event repeater. 221 222 my $file = new IO::File(">/tmp/remote"); 223 print($file "hello!!!\n") if $file; 224 if ( $count == 0 && $type ne "experiment" ) { 225 my $remote_pubsub_port = $PUBSUB_PORT - 1; # There will be a local 226 # pubsubd running, so we 227 # dodge the port on the 228 # remote tunnel node. 229 print($file "In here!\n"); 230 # Make sure we have the relevant parameters 231 die "Missing event repeater params (No config file ?)\n" 232 unless $event_repeater && $opts{'remoteexperiment'} && 233 $opts{'localexperiment'}; 234 235 print "Starting event repeater\n" if $debug; 236 237 print($file "$event_repeater -P $remote_pubsub_port -S localhost " . 238 "-E $opts{'remoteexperiment'} -e $opts{'localexperiment'}\n") 239 if $file; 240 # Connect to the forwarded pubsub port on this host to listen to the 241 # other experiment's events, and to the local experiment to forward 242 # events. 243 system("$event_repeater -P $remote_pubsub_port -S localhost " . 244 "-E $opts{'remoteexperiment'} -e $opts{'localexperiment'}"); 245 warn "Event repeater returned $?\n" if $?; 246 } 247 $file->close() if $file; 212 248 } else { 213 249 print "inactive end of a connection, finishing" if ($debug); -
fedkit/splitter.pl
rf64fa81 r8034579 10 10 11 11 my @scripts = ("fed_bootstrap", "federate.sh", "smbmount.pl", 12 "make_hosts", "fed-tun.pl" );12 "make_hosts", "fed-tun.pl", "fed_evrepeater" ); 13 13 my $local_script_dir = "."; 14 14 my($pid, $gid); # Process and group IDs for calling parse.tcl … … 638 638 my $ddomain = # domain for the destination 639 639 $tbparams->{$dtb}->{'domain'}; 640 my $sproject = # Project of the destination640 my $sproject = # Project of the source 641 641 $tbparams->{$gateways}->{'project'}; 642 my $dproject = # Project of the destination 643 $tbparams->{$dtb}->{'project'}; 642 644 my $fs = # Master fs node (FQDN) 643 645 $tbparams->{$master}->{'fs'} . $tbparams->{$master}->{'domain'}; … … 648 650 $tbparams->{$master}->{'domain'}; 649 651 my $remote_script_dir = # Remote fed script location 650 "/proj/" . $tbparams->{$dtb}->{'project'} . "/exp/$eid/tmp"; 652 "/proj/" . $dproject . "/exp/$eid/tmp"; 653 my $local_script_dir = # Local fed script location 654 "/proj/" . $sproject . "/exp/$eid/tmp"; 651 655 my $active; # Is this the active side of 652 656 # the connector? … … 656 660 657 661 my $conf_file = "$myname$sdomain.gw.conf"; 662 my $remote_conf_file = "$desthost$ddomain.gw.conf"; 658 663 # translate to lower case so the `hostname` hack for specifying 659 664 # configuration files works. 660 665 $conf_file =~ tr/A-Z/a-z/; 666 $remote_conf_file =~ tr/A-Z/a-z/; 661 667 662 668 # If either end of this link is in the master side of the testbed, that … … 684 690 print $gwconfig "Type: $type\n"; 685 691 print $gwconfig "RemoteScriptDir: $remote_script_dir\n"; 692 print $gwconfig "EventRepeater: $local_script_dir/fed_evrepeater\n"; 693 print $gwconfig "RemoteExperiment: $dproject/$eid\n"; 694 print $gwconfig "LocalExperiment: $sproject/$eid\n"; 695 print $gwconfig "RemoteConfigFile: " . 696 "$remote_script_dir/$remote_conf_file\n"; 686 697 print $gwconfig "Peer: $desthost$ddomain\n"; 687 698 print $gwconfig "Pubkeys: " .
Note: See TracChangeset
for help on using the changeset viewer.