IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 22, 2014, 3:50:46 PM (12 years ago)
Author:
watersc1
Message:

path change, trace drop, config typo fix, stack psf fix, exec force poll addition, exec drop/fails (likely needs further tuning), transfer shift to rsync return handler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/sc_transfer_tool.pl

    r37013 r37102  
    1010use Sys::Hostname;
    1111
    12 my $local_raw = '/scratch3/watersc1/raw/';
    13 my $local_tmp = '/scratch3/watersc1/tmp/';
     12my $remote_root = '/lustre/scratch1/turquoise/watersc1/ps1/';
     13
     14my $local_raw = "${remote_root}/raw/";
     15my $local_tmp = "${remote_root}/tmp/";
    1416my $threads = 10;
    1517my @hosts = ('ippc20.ipp.ifa.hawaii.edu','ippc24.ipp.ifa.hawaii.edu','ippc28.ipp.ifa.hawaii.edu',
     
    6870    }
    6971    elsif (!($fetch)) { # We are pushing
    70         print { $filehandles[$i] } "${local_tmp}/$_" . "\n";
     72        # The rsync call expects to find files of a given name in the directory specified.
     73#       print { $filehandles[$i] } "${local_tmp}/$_" . "\n";
     74        print { $filehandles[$i] } "$_" . "\n";
    7175    }
    7276}
     
    112116
    113117    # the transform bit is there because it looks like the ' gets dropped, so the * is interpreted, and why is our tar so out of date?
    114     my $command = "tar cf - --ignore-failed-read --dereference --files-from=${transfer_filelist} | /usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes $destination_host tar xf - -C /data/ --transform '" . 's,^.\*/data/,,' . "' --dereference";
     118#    my $command = "tar cf - --ignore-failed-read --dereference --files-from=${transfer_filelist} | /usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes $destination_host tar xf - -C /data/ --transform '" . 's,^.\*/data/,,' . "' --dereference";
     119    my $command = "rsync -Lpt -e '/usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes' --files-from=${transfer_filelist} ${local_tmp} ${destination_host}:/";
    115120    print STDERR "$command\n";
    116121
     
    118123        run(command => $command, verbose => $verbose);
    119124    unless ($success) {
    120 
    121125        print STDERR "ERROR:  $error_code\n";
    122126#       my $std = join "\n", @{ $stdout_buf };
     
    125129#       print "STDERR: $std\n";
    126130
    127         foreach my $line (@{ $stderr_buf }) {  # This is a hack.  A messy ugly hack.
    128             if ($line =~ /No such file or directory/) {
    129                 my $file = (split /\s+/, $line)[1];
    130                 $file =~ s/:$//;
    131                 if ($file !~ /nebulous/) { next; }
    132                 print STDERR "Touching $file so tar can continue.\n";
    133                 system("touch $file");
    134             }
    135         }
     131#       foreach my $line (@{ $stderr_buf }) {  # This is a hack.  A messy ugly hack.
     132#           if ($line =~ /No such file or directory/) {
     133#               my $file = (split /\s+/, $line)[1];
     134#               $file =~ s/:$//;
     135#               if ($file !~ /nebulous/) { next; }
     136#               print STDERR "Touching $file so tar can continue.\n";
     137#               system("touch $file");
     138#           }
     139#       }
    136140
    137141        warn("Transfer of $transfer_filelist to $destination_host failed with error $error_code.");
Note: See TracChangeset for help on using the changeset viewer.