Bug 1536 - Make gatekeeper port reusable
: Make gatekeeper port reusable
Status: RESOLVED FIXED
: GRAM
gt2 Gatekeeper/Jobmanager
: 1.6
: PC All
: P2 enhancement
: 3.2
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-02-12 17:32 by
Modified: 2004-03-03 10:06 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-02-12 17:32:01
Some people, particularly our friends from EDG, EGEE, and LCG, run the 
gatekeeper as a daemon, instead of running it from xinetd. 

It would be nice if the gatekeeper made its port reusable, so when the 
gatekeeper is stopped and restarted, you don't have to wait a long time to 
restart the gatekeeper. 

Here is a small patch from David Smith of LCG to provide exactly this 
functionality. It's a short patch, and it is well-tested. We hope it can make 
it into an upcoming Globus release. 

Thanks,
Alain Roy, VDT

--- 
globus_2_4_3_adv2003_fix892_fix956_more/gatekeeper/source/globus_gatekeeper.c  
 Tue Jan 20 17:04:24 2004
+++ 
globus_2_4_3_adv2003_fix892_fix956_plus/gatekeeper/source/globus_gatekeeper.c  
 Tue Jan 20 17:23:29 2004
@@ -2327,6 +2327,7 @@
     netlen_t        sinlen;
     struct sockaddr_in sin;
     long flags;
+    int one=1;
 
     *skt = socket(AF_INET, SOCK_STREAM, 0);
     error_check(*skt,"net_setup_anon_listener socket");
@@ -2335,6 +2336,9 @@
     flags |= O_NONBLOCK;
     fcntl(*skt, F_SETFL, flags);
 
+    error_check(setsockopt(*skt, SOL_SOCKET, SO_REUSEADDR, (char *)&one, 
sizeof(one)),
+                "net_setup_anon_listener setsockopt");
+
     sin.sin_family = AF_INET;
     sin.sin_addr.s_addr = INADDR_ANY;
     sin.sin_port = htons(*port);
------- Comment #1 From 2004-03-02 15:37:39 -------
This patch seems to be from a version different than either the trunk or the 
2.4.3 release. Where there some other patches applied between the Globus 
Toolkit release and this, and are they needed? 
 
joe 
------- Comment #2 From 2004-03-02 17:17:43 -------
See bug 1538.  Please implement at least this very easy and useful fix:
it allows the admin to drain the batch system to some extent by stopping
just the gatekeeper, restarting it at some later time without affecting
running jobs or waiting for all of them to have finished.  Thanks!
------- Comment #3 From 2004-03-03 10:06:15 -------
This patch is committed to 3.2 branch and CVS trunk. 
 
joe