[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Better error messages when getaddrinfo returns only IPv...



Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria.mit.edu:/tmp/cvs-serv12792/lib/mixminion/server

Modified Files:
	DNSFarm.py MMTPServer.py 
Log Message:
Better error messages when getaddrinfo returns only IPv6 addresses, but
we don't support IPv6.

Better log messages on DNS in general.


Index: DNSFarm.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/DNSFarm.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- DNSFarm.py	28 Nov 2003 04:14:04 -0000	1.5
+++ DNSFarm.py	8 Jan 2004 18:09:50 -0000	1.6
@@ -84,6 +84,7 @@
         if v is not None:
             cb(name,v)
             return
+
         try:
             self.lock.acquire()
             v = self.cache.get(name)
@@ -92,11 +93,14 @@
                 self.callbacks.setdefault(name, []).append(cb)
             # If we aren't looking up the answer, start looking it up.
             if v is None:
+                LOG.trace("DNS cache starting lookup of %r", name)
                 self._beginLookup(name)
         finally:
             self.lock.release()
         # If we _did_ have an answer, invoke the callback now.
         if v is not None and v is not PENDING:
+            LOG.trace("DNS cache returning cached value %s for %r",
+                      v,name)
             cb(name,v)
 
     def shutdown(self, wait=0):

Index: MMTPServer.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/MMTPServer.py,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- MMTPServer.py	4 Jan 2004 02:44:10 -0000	1.67
+++ MMTPServer.py	8 Jan 2004 18:09:50 -0000	1.68
@@ -510,6 +510,7 @@
                            self=self, routing=routing, deliverable=deliverable,
                            serverName=serverName):
                 if family == "NOENT":
+                    LOG.warn("Couldn't resolve %r: %s", name, addr)
                     # The lookup failed, so tell all of the message objects.
                     for m in deliverable:
                         try: