summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-11-26 18:29:39 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-11-26 18:29:39 +0000
commit8b754e6d80a9a6a6fc17b300ad6461aa60079fe9 (patch)
tree0cc27e7df635cf60e1c5a28d24c97afa55a9b533 /src/sbin
parentc04ff819671b11147042cf5ef57561a03b25e03e (diff)
downloadbcfg2-8b754e6d80a9a6a6fc17b300ad6461aa60079fe9.tar.gz
bcfg2-8b754e6d80a9a6a6fc17b300ad6461aa60079fe9.tar.bz2
bcfg2-8b754e6d80a9a6a6fc17b300ad6461aa60079fe9.zip
Make the bcfg2 server drain the fam queue before processing network requests (Hopefully Resolves Ticket #282)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2544 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-server9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index 0546d869f..0f67ccff1 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -97,6 +97,15 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
for method in plugin.__rmi__:
self.register_function(getattr(self.Core.plugins[plugin.__name__], method),
"%s.%s" % (plugin.__name__, method))
+ famfd = self.Core.fam.fileno()
+ while True:
+ try:
+ rsockinfo = select.select([famfd], [], [], 15)[0]
+ if not rsockinfo:
+ break
+ self.Core.Service()
+ except socket.error:
+ continue
def get_request(self):
'''We need to do work between requests, so select with timeout instead of blocking in accept'''