[Swift-commit] r2995 - trunk/bin

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Fri Jul 3 04:27:56 CDT 2009


Author: benc
Date: 2009-07-03 04:27:55 -0500 (Fri, 03 Jul 2009)
New Revision: 2995

Modified:
   trunk/bin/swift-osg-ress-site-catalog
Log:
A fix for sites having multiple gatekeepers advertised under the same site name.
Contributed by: Mats Rynge <rynge at renci.org>

Modified: trunk/bin/swift-osg-ress-site-catalog
===================================================================
--- trunk/bin/swift-osg-ress-site-catalog	2009-07-01 15:11:01 UTC (rev 2994)
+++ trunk/bin/swift-osg-ress-site-catalog	2009-07-03 09:27:55 UTC (rev 2995)
@@ -56,7 +56,7 @@
     if ($_ eq "") {
         if ($tmp{'GlueSiteName'} ne "") {
             my %copy = %tmp;
-            $ads{$tmp{'GlueSiteName'}} = \%copy;
+            $ads{$tmp{'GlueSiteName'} . "_" . $tmp{'GlueClusterUniqueID'}} = \%copy;
             undef %tmp;
         }
     }
@@ -73,10 +73,10 @@
 
 open(FH, ">$opt_out") or die("Unable to open $opt_out");
 print FH "<config>\n";
-foreach my $sitename (keys %ads) {
-    my $contact = $ads{$sitename}->{'GlueCEInfoContactString'};
+foreach my $siteid (sort keys %ads) {
+    my $contact = $ads{$siteid}->{'GlueCEInfoContactString'};
     my $host = $contact;
-    $host =~ s/:.*//;
+    $host =~ s/[:\/].*//;
     my $jm = $contact;
     $jm =~ s/.*jobmanager-//;
     if ($jm eq "pbs") {
@@ -91,10 +91,10 @@
     elsif ($jm eq "condor") {
         $jm = "Condor";
     }
-    my $workdir = $ads{$sitename}->{'GlueCEInfoDataDir'};
+    my $workdir = $ads{$siteid}->{'GlueCEInfoDataDir'};
     print FH "\n";
-    print FH "  <!-- $sitename -->\n";
-    print FH "  <pool handle=\"$sitename\" >\n";
+    print FH "  <!-- $siteid -->\n";
+    print FH "  <pool handle=\"$siteid\" >\n";
     print FH "    <gridftp  url=\"gsiftp://$host/\" />\n";
     if ($opt_condorg) {
         print FH "    <execution provider=\"condor\" />\n";
@@ -110,7 +110,7 @@
     else {
         print FH "    <jobmanager universe=\"vanilla\" url=\"$contact\" major=\"2\" />\n";
     }
-    print FH "    <workdirectory >$workdir/$lc_vo/tmp/$sitename</workdirectory>\n";
+    print FH "    <workdirectory >$workdir/$lc_vo/tmp/$host</workdirectory>\n";
     print FH "  </pool>\n";
 }
 print FH "\n</config>\n";




More information about the Swift-commit mailing list