New issue
Advanced search Search tips
Starred by 4 users

Issue metadata

Status: Fixed
Closed: Apr 17
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 0
Type: Bug

Sign in to add a comment

Data base error cause most builder error

Project Member Reported by, Apr 17

Issue description

Builder failed in HWTest__provision with such error log:

@@@STEP_LINK@Link to suite@http://cautotest-prod/afe/#tab_id=view_job&object_id=192570433@@@
  04-16-2018 [19:57:06] Suite job is finished.
  04-16-2018 [19:57:06] Start collecting test results and dump them to json.
  <class 'autotest_lib.frontend.afe.json_rpc.proxy.JSONRPCException'>(DatabaseError: (1146, "Table 'chromeos_autotest_db.tko_test_attributes' doesn't exist")
  Traceback (most recent call last):
    File "/usr/local/autotest/frontend/afe/json_rpc/", line 109, in dispatchRequest
      results['result'] = self.invokeServiceEndpoint(meth, args)
    File "/usr/local/autotest/frontend/afe/json_rpc/", line 147, in invokeServiceEndpoint
      return meth(*args)
    File "/usr/local/autotest/frontend/afe/", line 270, in new_fn
      return f(*args, **keyword_args)
    File "/usr/local/autotest/frontend/tko/", line 190, in get_detailed_test_views
    File "/usr/local/autotest/frontend/afe/", line 467, in populate_relationships
      for base_object, related_object in pivot_iterator:
    File "/usr/local/autotest/frontend/afe/", line 381, in _many_to_one_pivot
      for related_object in related_model.objects.filter(**filter_data):
    File "/usr/local/autotest/site-packages/django/db/models/", line 123, in _result_iter
    File "/usr/local/autotest/site-packages/django/db/models/", line 927, in _fill_cache
    File "/usr/local/autotest/site-packages/django/db/models/", line 301, in iterator
      for row in compiler.results_iter():
    File "/usr/local/autotest/site-packages/django/db/models/sql/", line 775, in results_iter
      for rows in self.execute_sql(MULTI):
    File "/usr/local/autotest/site-packages/django/db/models/sql/", line 840, in execute_sql
      cursor.execute(sql, params)
    File "/usr/local/autotest/site-packages/django/db/backends/mysql/", line 130, in execute
      six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2])
    File "/usr/local/autotest/site-packages/django/db/backends/mysql/", line 120, in execute
      return self.cursor.execute(query, args)
    File "/usr/local/autotest/site-packages/MySQLdb/", line 174, in execute
      self.errorhandler(self, exc, value)
    File "/usr/local/autotest/site-packages/MySQLdb/", line 36, in defaulterrorhandler
      raise errorclass, errorvalue
  DatabaseError: (1146, "Table 'chromeos_autotest_db.tko_test_attributes' doesn't exist")

Labels: -Pri-1 Pri-0
AFE also shows this symptom. This bug requires communication on cros-infra-outages from the deputy.
Caused by , I will first recreate an empty table tko_test_attributes.
Verified that an autotest job link (http://cautotest-prod/afe/#tab_id=view_job&object_id=192570098) no longer complains about missing table.
This was my bad. I thought I was sufficiently careful after the fact, but it seems I was not.

This also brought down chrome pfq.
Perhaps we should have a script to do all these drop table create table stuff before we have a real solution so people have no way to make mistake.
Agreed. I went looking for a script and was surprised when I didn't find one.
Status: Fixed
Close this as it's fixed. Following bugs please track , .

Sign in to add a comment