Check for DBS3 duplicate insertions
Sometimes DBS3 takes longer than what the FrontEnd expects before giving back a response, this results in broken connection that the DBSUpload sees as a Proxy Error 502. However, the block injection may have been successful and afterwards the WMAgent is stuck trying to inject the block again over and over.

We need to check for errors like:

400  DBSBlockInsert/insertBlock. Block already exists.

And trust DBS3 that if we get that message then the block is safely there and we can stop uploading.

Option 2: Whenever we get an upload error, verify with DBS3 if the block is actually there or not.

diff --git a/src/python/WMComponent/DBS3Buffer/DBSUploadPoller.py b/src/python/WMComponent/DBS3Buffer/DBSUploadPoller.py
index aedc8ea95..e22646c5f 100644
--- a/src/python/WMComponent/DBS3Buffer/DBSUploadPoller.py
+++ b/src/python/WMComponent/DBS3Buffer/DBSUploadPoller.py
@@ -137,13 +137,12 @@ def uploadWorker(input, results, dbsUrl):
             results.put({'name': name, 'success': True})
         except Exception, ex:
             exString = str(ex)
-            if 'Duplicate entry' in exString:
+            if 'Block already exists.' in exString:
                 # Then this is probably a duplicate
                 # Ignore this for now
-                logging.error("Had duplicate entry for block %s\\n" % name)
-                logging.error("Ignoring for now.\\n")
-                logging.error("Exception: %s\\n" % exString)
-                logging.error("Traceback: %s\\n" % str(traceback.format_exc()))
+                logging.error("Had duplicate entry for block %s. Ignoring for now." % name)
+                logging.debug("Exception: %s" % exString)
+                logging.debug("Traceback: %s" % str(traceback.format_exc()))
                 results.put({'name': name, 'success': True})
             else:
                 msg =  "Error trying to process block %s through DBS.\\n" % name
['src/python/WMComponent/DBS3Buffer/DBSUploadPoller.py']