Comment 3 for bug 1570937

Revision history for this message
Brian Murray (brian-murray) wrote :

We could stop accepting core files for large crashes with something like this:

 $ bzr diff
=== modified file 'daisy/submit_core.py'
--- daisy/submit_core.py 2016-05-24 16:29:14 +0000
+++ daisy/submit_core.py 2016-05-24 16:44:33 +0000
@@ -117,8 +117,10 @@
             t_size = os.path.getsize(t.name)
             msg = '%s has a %i byte core file' % (oops_id, t_size)
             logger.info(msg)
- # Don't set a content_length (that we don't have) to force a chunked
- # transfer.
+ if t_size > 100000:
+ msg = 'Not writing extra large core file for %s.' % (oops_id)
+ logger.info(msg)
+ return False
             _cached_swift.put_object(bucket, oops_id, t, content_length=t_size)
     except IOError, e:
         swift_delete_ignoring_error(_cached_swift, bucket, oops_id)
@@ -233,6 +235,7 @@
     if written:
         return message
     else:
+ # don't want this to increment if it is a large core file
         metrics.meter('storage_write_error')
         return None