Changeset 9b3627e for fedkit


Ignore:
Timestamp:
Mar 9, 2010 1:08:05 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
4e9719b
Parents:
c2c153b
Message:

SEER support

Location:
fedkit
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • fedkit/Makefile

    rc2c153b r9b3627e  
    33         config_from_tunnelip.pl active_config.pl combo.pl \
    44         prep_gateway.pl port_forward.pl setup_bridge.pl import_key.pl \
    5          protogeni_routing.pl
     5         protogeni_routing.pl start_seer.pl
    66
    77LIBRARIES=gateway_lib.pm
  • fedkit/combo.pl

    rc2c153b r9b3627e  
    1818my $iface_file = "/var/emulab/boot/ifmap";
    1919my $ssh = "/usr/bin/ssh";
     20my $seer;
    2021my $ssh_port = 22;
    2122my @ports;
     
    3536    'ssh_port=s' => \$ssh_port,
    3637    'use_file' => \$use_file,
     38    'seer' => \$seer,
    3739);
    3840
     
    6163        "--ssh=$ssh --ssh_port=$ssh_port $portparam");
    6264    exit(20) if $?;
     65
     66    if ($seer ) {
     67        system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/start_seer.pl " .
     68            "--peer=$peer --seer --fedkit=$fedkit_dir --perl=$perl " .
     69            "--ssh=$ssh --ssh_privkey=$ssh_privkey");
     70        exit(20) if $?;
     71    }
     72
    6373}
    6474else {
  • fedkit/federate.pl

    rc2c153b r9b3627e  
    5858    $from->close();
    5959    $to->close();
    60     # Now, samba
    61     system('/usr/bin/yum -y install samba-client');
     60    # Now, samba.  Because of the python dance on PG, we need to call python2.2
     61    # explicitly
     62    system('/usr/bin/python2.2 /usr/bin/yum -y install samba-client');
    6263    # These tools expect the fstab to include smbfs instead
    6364    $smb_type = 'smbfs';
  • fedkit/gateway_lib.pm

    rc2c153b r9b3627e  
    367367
    368368
     369sub client_conf_filename {
     370    # Find the configuration file in the usual places, if there is one in
     371    # /usr/local/federation/etc, use it, otherwise look in the emulab standard
     372    # filesystems which depends on what experiment and project we're in.
     373    my $pid;
     374    my $eid;
     375    my $filename;
     376    my $fed_dir = "/usr/local/federation/etc/";
     377
     378    return "$fed_dir/client.conf" if -r "$fed_dir/client.conf";
     379
     380    my $tmcd = new IO::Pipe() || die "Can't create pipe: $!\n";
     381
     382    $tmcd->reader("$TMCC status");
     383
     384    while (<$tmcd>) {
     385        chomp;
     386        /ALLOCATED=([^\/]+)\/(\S+)/ && do {
     387            $pid = $1;
     388            $eid = $2;
     389        };
     390    }
     391    $tmcd->close();
     392    $filename = "/proj/$pid/exp/$eid/tmp/client.conf"
     393        if $pid and $eid;
     394
     395    return $filename;
     396}
     397
    369398sub wait_for_port {
    370399    my($addr, $port, $timeout, $sleep) = @_;
     
    376405
    377406    while (!$s) {
     407        # We've seen some arp pollution, so be proactive about clearing the
     408        # cache if we're waiting to get out.
     409        system("arp -d -a");
    378410        if (!($s = new IO::Socket(Domain => &AF_INET, PeerAddr => $addr,
    379411            PeerPort => $port))) {
  • fedkit/prep_gateway.pl

    rc2c153b r9b3627e  
    4949    $from->close();
    5050    $to->close();
    51     # Now, bridging
    52     system('/usr/bin/yum -y install bridge-utils');
     51    # Now, bridging (use old python...)
     52    system('/usr/bin/python2.2 /usr/bin/yum -y install bridge-utils');
    5353    #and keys
    5454    gateway_lib::import_key($ssh_pubkey,'/root/.ssh/authorized_keys')
  • fedkit/smbmount.Linux.pl

    rc2c153b r9b3627e  
    5959        /GID=(\S+)/ && do { $gid = $1; };
    6060        /HOMEDIR=(\S+)/ && do { $homedir = $1; };
     61        my $ids = $FSTYPE == 'smbfs' ? ",uid=$uid,gid=$gid" : "";
    6162
    6263        open(PWDFILE, ">/tmp/$user.cifs_creds") ||
     
    7071        print FSTAB "//$SHARE/$user\t";
    7172        print FSTAB "$homedir\t$FSTYPE\t";
    72         print FSTAB "auto,rw,credentials=/tmp/$user.cifs_creds,ip=$ADDR\t0\t0\n";
     73        print FSTAB "auto,rw,credentials=/tmp/$user.cifs_creds$ids,ip=$ADDR\t0\t0\n";
    7374
    7475        #
     
    8384        if($user =~ m/$PUSER/i) {
    8485            print FSTAB "//$SHARE/proj-$PNAME\t";
    85             print FSTAB "$PROJROOT/$PNAME\tcifs\t";
    86             print FSTAB "rw,credentials=/tmp/$user.cifs_creds,ip=$ADDR\t0\t0\n";
     86            print FSTAB "$PROJROOT/$PNAME\t$FSTYPE\t";
     87            print FSTAB "rw,credentials=/tmp/$user.cifs_creds$ids,ip=$ADDR\t0\t0\n";
     88            mkdir("/$PROJROOT/$PNAME") unless -d "/$PROJROOT/$PNAME";
    8789            if ( $share) {
    8890                print FSTAB "//$SHARE/share\t";
    8991                print FSTAB "/share\t$FSTYPE\t";
    90                 print FSTAB "rw,credentials=/tmp/$user.cifs_creds,ip=$ADDR\t0\t0\n";
     92                print FSTAB "rw,credentials=/tmp/$user.cifs_creds$ids,ip=$ADDR\t0\t0\n";
    9193
    9294                mkdir("/share") unless -d "/share";
Note: See TracChangeset for help on using the changeset viewer.