Advertisement
Guest User

Untitled

a guest
Dec 5th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.32 KB | None | 0 0
  1. noc# cat crashinfo-dc49b15991f9aa469a615a71e0bb474191aba23b
  2. (dp1
  3. S'component'
  4. p2
  5. S'noc-scheduler'
  6. p3
  7. sS'source'
  8. p4
  9. S'system'
  10. p5
  11. sS'traceback'
  12. p6
  13. VUNHANDLED EXCEPTION (2013-12-05 12:11:27.657852)\u000aWorking directory: /usr/local/noc\u000a<class 'django.db.utils.IntegrityError'>\u000aupdate or delete on table "sa_reducetask" violates foreign key constraint "task_id_refs_id_193c71167fb7d148" on table "sa_maptask"\u000aDETAIL: Key (id)=(8740083) is still referenced from table "sa_maptask".\u000a\u000aSTART OF TRACEBACK\u000a------------------------------------------------------------------------\u000aFile: /usr/local/noc/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py (Line: 52)\u000aFunction: execute\u000a 45 """\u000a 46 \u000a 47 def __init__(self, cursor):\u000a 48 self.cursor = cursor\u000a 49 \u000a 50 def execute(self, query, args=None):\u000a 51 try:\u000a 52 ==> return self.cursor.execute(query, args)\u000a 53 except Database.IntegrityError, e:\u000a 54 raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]\u000a 55 except Database.DatabaseError, e:\u000a 56 raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), sys.exc_info()[2]\u000a 57 \u000a 58 def executemany(self, query, args):\u000aVariables:\u000a query = 'DELETE FROM "sa_reducetask" WHERE "id" IN (%s)'\u000a self = \u000a<django.db.backends.postgresql_psycopg2.base.CursorWrapper object at 0x80941c650>\u000a args = (8740083,)\u000a e = \u000aIntegrityError('update or delete on table "sa_reducetask" violates foreign key constraint "task_id_refs_id_193c71167fb7d148" on table "sa_maptask"\u005cnDETAIL: Key (id)=(8740083) is still referenced from table "sa_maptask".\u005cn',)\u000a------------------------------------------------------------------------\u000aFile: /usr/local/noc/lib/python2.7/site-packages/django/db/models/sql/compiler.py (Line: 818)\u000aFunction: execute_sql\u000a 811 except EmptyResultSet:\u000a 812 if result_type == MULTI:\u000a 813 return empty_iter()\u000a 814 else:\u000a 815 return\u000a 816 \u000a 817 cursor = self.connection.cursor()\u000a 818 ==> cursor.execute(sql, params)\u000a 819 \u000a 820 if not result_type:\u000a 821 return cursor\u000a 822 if result_type == SINGLE:\u000a 823 if self.query.ordering_aliases:\u000a 824 return cursor.fetchone()[:-len(self.query.ordering_aliases)]\u000aVariables:\u000a cursor = <django.db.backends.util.CursorWrapper object at 0x80941c950>\u000a self = <django.db.models.sql.compiler.SQLDeleteCompiler object at 0x807aeaa50>\u000a params = (8740083,)\u000a result_type = None\u000a sql = 'DELETE FROM "sa_reducetask" WHERE "id" IN (%s)'\u000a------------------------------------------------------------------------\u000aFile: /usr/local/noc/lib/python2.7/site-packages/django/db/models/sql/subqueries.py (Line: 29)\u000aFunction: do_query\u000a 22 """\u000a 23 \u000a 24 compiler = 'SQLDeleteCompiler'\u000a 25 \u000a 26 def do_query(self, table, where, using):\u000a 27 self.tables = [table]\u000a 28 self.where = where\u000a 29 ==> self.get_compiler(using).execute_sql(None)\u000a 30 \u000a 31 def delete_batch(self, pk_list, using, field=None):\u000a 32 """\u000a 33 Set up and execute delete queries for all the objects in pk_list.\u000a 34 \u000a 35 More than one physical query may be executed if there are a\u000aVariables:\u000a using = 'default'\u000a self = <django.db.models.sql.subqueries.DeleteQuery object at 0x807aeab10>\u000a where = <django.db.models.sql.where.WhereNode object at 0x807aeabd0>\u000a table = 'sa_reducetask'\u000a------------------------------------------------------------------------\u000aFile: /usr/local/noc/lib/python2.7/site-packages/django/db/models/sql/subqueries.py (Line: 44)\u000aFunction: delete_batch\u000a 37 """\u000a 38 if not field:\u000a 39 field = self.model._meta.pk\u000a 40 for offset in range(0, len(pk_list), GET_ITERATOR_CHUNK_SIZE):\u000a 41 where = self.where_class()\u000a 42 where.add((Constraint(None, field.column, field), 'in',\u000a 43 pk_list[offset:offset + GET_ITERATOR_CHUNK_SIZE]), AND)\u000a 44 ==> self.do_query(self.model._meta.db_table, where, using=using)\u000a 45 \u000a 46 class UpdateQuery(Query):\u000a 47 """\u000a 48 Represents an "update" SQL query.\u000a 49 """\u000a 50 \u000aVariables:\u000a self = <django.db.models.sql.subqueries.DeleteQuery object at 0x807aeab10>\u000a field = <django.db.models.fields.AutoField: id>\u000a pk_list = [8740083]\u000a offset = 0\u000a using = 'default'\u000a where = <django.db.models.sql.where.WhereNode object at 0x807aeabd0>\u000a------------------------------------------------------------------------\u000aFile: /usr/local/noc/lib/python2.7/site-packages/django/db/models/deletion.py (Line: 263)\u000aFunction: delete\u000a 256 for field, instances in batches.iteritems():\u000a 257 query.delete_batch([obj.pk for obj in instances], self.using, field)\u000a 258 \u000a 259 # delete instances\u000a 260 for model, instances in self.data.iteritems():\u000a 261 query = sql.DeleteQuery(model)\u000a 262 pk_list = [obj.pk for obj in instances]\u000a 263 ==> query.delete_batch(pk_list, self.using)\u000a 264 \u000a 265 # send post_delete signals\u000a 266 for model, obj in self.instances_with_model():\u000a 267 if not model._meta.auto_created:\u000a 268 signals.post_delete.send(\u000a 269 sender=model, instance=obj, using=self.using\u000aVariables:\u000a obj = <ReduceTask: 8740083>\u000a self = <django.db.models.deletion.Collector object at 0x8011bca50>\u000a instances = [<ReduceTask: 8740083>]\u000a pk_list = [8740083]\u000a query = <django.db.models.sql.subqueries.DeleteQuery object at 0x807aeab10>\u000a model = <class 'noc.sa.models.reducetask.ReduceTask'>\u000a------------------------------------------------------------------------\u000aFile: /usr/local/noc/lib/python2.7/site-packages/django/db/models/deletion.py (Line: 61)\u000aFunction: decorated\u000a 54 def decorated(self, *args, **kwargs):\u000a 55 if not transaction.is_managed(using=self.using):\u000a 56 transaction.enter_transaction_management(using=self.using)\u000a 57 forced_managed = True\u000a 58 else:\u000a 59 forced_managed = False\u000a 60 try:\u000a 61 ==> func(self, *args, **kwargs)\u000a 62 if forced_managed:\u000a 63 transaction.commit(using=self.using)\u000a 64 else:\u000a 65 transaction.commit_unless_managed(using=self.using)\u000a 66 finally:\u000a 67 if forced_managed:\u000aVariables:\u000a self = <django.db.models.deletion.Collector object at 0x8011bca50>\u000a kwargs = {}\u000a func = <function delete at 0x803d7f6e0>\u000a args = ()\u000a forced_managed = True\u000a------------------------------------------------------------------------\u000aFile: /usr/local/noc/lib/python2.7/site-packages/django/db/models/base.py (Line: 576)\u000aFunction: delete\u000a 569 \u000a 570 def delete(self, using=None):\u000a 571 using = using or router.db_for_write(self.__class__, instance=self)\u000a 572 assert self._get_pk_val() is not None, "%s object can't be deleted because its %s attribute is set to None." % (self._meta.object_name, self._meta.pk.attname)\u000a 573 \u000a 574 collector = Collector(using=using)\u000a 575 collector.collect([self])\u000a 576 ==> collector.delete()\u000a 577 \u000a 578 delete.alters_data = True\u000a 579 \u000a 580 def _get_FIELD_display(self, field):\u000a 581 value = getattr(self, field.attname)\u000a 582 return force_unicode(dict(field.flatchoices).get(value, value), strings_only=True)\u000aVariables:\u000a using = 'default'\u000a self = <ReduceTask: 8740083>\u000a collector = <django.db.models.deletion.Collector object at 0x8011bca50>\u000a------------------------------------------------------------------------\u000aFile: /usr/local/noc/main/jobs/cleanup.py (Line: 41)\u000aFunction: cleanup_mrt\u000a 34 def cleanup_mrt(self):\u000a 35 """\u000a 36 Remove old map/reduce tasks\u000a 37 """\u000a 38 self.info("Cleanup map/reduce tasks")\u000a 39 watermark = datetime.datetime.now() - datetime.timedelta(days=1)\u000a 40 for t in ReduceTask.objects.filter(stop_time__lt=watermark):\u000a 41 ==> t.delete()\u000a 42 self.info("Map/Reduce tasks are cleaned")\u000a 43 self.info("Compacting MRT tables")\u000a 44 vacuum(ReduceTask._meta.db_table, analyze=True)\u000a 45 vacuum(MapTask._meta.db_table, analyze=True)\u000a 46 self.info("MRT Tables are compacted")\u000a 47 \u000aVariables:\u000a self = <noc.main.jobs.cleanup.CleanupJob object at 0x8096c4fd0>\u000a t = <ReduceTask: 8740083>\u000a watermark = datetime.datetime(2013, 12, 4, 12, 11, 27, 357452)\u000a------------------------------------------------------------------------\u000aFile: /usr/local/noc/main/jobs/cleanup.py (Line: 81)\u000aFunction: handler\u000a 74 d = datetime.datetime.now() - datetime.timedelta(days=7)\u000a 75 self.info("Cleaning failed scripts log")\u000a 76 FailedScriptLog.objects.filter(timestamp__lte=d).delete()\u000a 77 self.info("Failed scripts logs are cleaned")\u000a 78 \u000a 79 def handler(self, *args, **kwargs):\u000a 80 self.cleanup_expired_sessions()\u000a 81 ==> self.cleanup_mrt()\u000a 82 self.cleanup_empty_categories()\u000a 83 self.cleanup_failed_script_log()\u000a 84 return True\u000aVariables:\u000a self = <noc.main.jobs.cleanup.CleanupJob object at 0x8096c4fd0>\u000a args = ()\u000a kwargs = {}\u000a------------------------------------------------------------------------\u000aFile: /usr/local/noc/lib/scheduler/scheduler.py (Line: 255)\u000aFunction: _job_wrapper\u000a 248 t.start()\u000a 249 else:\u000a 250 return self._job_wrapper(job, **kwargs)\u000a 251 \u000a 252 def _job_wrapper(self, job, **kwargs):\u000a 253 tb = None\u000a 254 try:\u000a 255 ==> r = job.handler(**kwargs)\u000a 256 except Exception:\u000a 257 error_report()\u000a 258 job.on_exception()\u000a 259 s = job.S_EXCEPTION\u000a 260 tb = get_traceback()\u000a 261 else:\u000aVariables:\u000a job = <noc.main.jobs.cleanup.CleanupJob object at 0x8096c4fd0>\u000a tb = None\u000a self = <noc.main.scheduler.scheduler.JobScheduler object at 0x807acaa50>\u000a kwargs = {}\u000a------------------------------------------------------------------------\u000aEND OF TRACEBACK
  14. p7
  15. sS'type'
  16. p8
  17. S'Unhandled Exception'
  18. p9
  19. sS'ts'
  20. p10
  21. I1386238287
  22. s.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement