lava-dashboard database upgrade

Asked by David Schwarz on 2011-10-05

I've successfully upgraded to the latest lava-server, lava-scheduler, and lava-dashboard using apt-get, but it looks like the backend database missed the bus. When I send a bundle to the dashboard server now (from the latest lava-dispatcher), I get the following deserialization failure:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/dashboard_app/models.py", line 403, in deserialize
    self._do_deserialize(prefer_evolution)
  File "/usr/lib/pymodules/python2.7/dashboard_app/models.py", line 424, in _do_deserialize
    helper.deserialize(self, prefer_evolution)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 757, in deserialize
    importer().import_document(s_bundle, doc)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 64, in import_document
    self._import_document_with_transaction(s_bundle, doc)
  File "/usr/lib/pymodules/python2.7/django/db/transaction.py", line 299, in _commit_on_success
    res = func(*args, **kw)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 106, in _import_document_with_transaction
    self._import_document(s_bundle, doc)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 110, in _import_document
    self._import_test_run(c_test_run, s_bundle)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 164, in _import_test_run
    s_test_run.denormalize()
  File "/usr/lib/pymodules/python2.7/dashboard_app/models.py", line 810, in denormalize
    self.denormalization
  File "/usr/lib/pymodules/python2.7/django/db/models/fields/related.py", line 237, in __get__
    rel_obj = self.related.model._base_manager.using(db).get(**params)
  File "/usr/lib/pymodules/python2.7/django/db/models/query.py", line 342, in get
    num = len(clone)
  File "/usr/lib/pymodules/python2.7/django/db/models/query.py", line 80, in __len__
    self._result_cache = list(self.iterator())
  File "/usr/lib/pymodules/python2.7/django/db/models/query.py", line 271, in iterator
    for row in compiler.results_iter():
  File "/usr/lib/pymodules/python2.7/django/db/models/sql/compiler.py", line 677, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/usr/lib/pymodules/python2.7/django/db/models/sql/compiler.py", line 732, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/pymodules/python2.7/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
    return self.cursor.execute(query, args)
DatabaseError: relation "dashboard_app_testrundenormalization" does not exist
LINE 1: ..._app_testrundenormalization"."count_unknown" FROM "dashboard...

The machine is running natty server.

Any suggestions on how to upgrade non-destructively to the latest schema?

Question information

Language:
English Edit question
Status:
Solved
For:
LAVA Dashboard (deprecated) Edit question
Assignee:
No assignee Edit question
Solved by:
Zygmunt Krynicki
Solved:
2011-10-06
Last query:
2011-10-06
Last reply:
2011-10-06
Zygmunt Krynicki (zyga) said : #1

There was a missing dependency for a few hours which would indicate that dashboard got updated before some other components but this should not affect the database. Could you please tell me the precise version of

lava-dashboard
lava-server

Could you please also run

sudo -u www-data lava-server manage migrate --list

And paste the output here?

David Schwarz (david-schwarz) said : #2

lava-server 0.5.1-0ubuntu0~lava1
lava-dashboard 0.8-0ubuntu0~lava1

Output of sudo -u www-data lava-server manage migrate --list:

 dashboard_app
  (*) 0001_initial
  (*) 0002_add_index_NamedAttribute_object_id_and_content_type_id_and_name
  (*) 0003_add_index_HardwareDevice_device_type
  (*) 0004_auto__add_softwarepackagescratch
  ( ) 0005_auto__chg_field_softwarepackage_version__chg_field_softwarepackage_nam
  ( ) 0006_auto__chg_field_bundledeserializationerror_bundle
  ( ) 0007_auto__add_tag
  ( ) 0008_auto__add_testingeffort
  ( ) 0009_auto__add_testrundenormalization
  ( ) 0010_denormalize_test_run

 lava_projects
  ( ) 0001_add_model_Project
  ( ) 0002_add_model_ProjectFormerIdentifier

 lava_scheduler_app
  (*) 0001_initial
  (*) 0002_auto__chg_field_testjob_device_type
  (*) 0003_auto__add_field_testjob_requested_device__add_field_testjob_requested_
  (*) 0004_fill_out_device_fields
  (*) 0005_auto__del_field_testjob_device_type__del_field_testjob_target
  (*) 0006_auto__add_field_testjob_log_file
  ( ) 0007_merged_migration
  ( ) 0008_auto__add_field_testjob_results_link

Zygmunt Krynicki (zyga) said : #3

Interesting, could you please run: sudo dpkg-reconfigure lava-server (when asked don't reinstall the database for lava-server).

Once this is done could you please check if the problem persists? If it is fixed could you look at /var/log/syslog and add the parts that are related to your previous upgrade (look at timestamps please) here?

David Schwarz (david-schwarz) said : #4

bamboo2:/usr> sudo dpkg-reconfigure lava-server
 * Reloading web server config apache2 [ OK ]
dbconfig-common: writing config to /etc/dbconfig-common/lava-server.conf
 * Reloading web server config apache2 [ OK ]

...but the problem remains.

Here's the output from the upgrade anyway. Looks like a django package is missing(?):

Oct 5 10:43:13 bamboo2 logger: (django-debian for package ): starting prerm script: lava-server upgrade 0.5.1-0ubuntu0~lava1
Oct 5 10:43:13 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 5 10:43:13 bamboo2 logger: (django-debian for package lava-server): De-configuring web server
Oct 5 10:43:13 bamboo2 logger: (django-debian for package lava-server): Removing generated web server integration files
Oct 5 10:43:13 bamboo2 logger: (django-debian for package lava-server): Restarting apache2 web server
Oct 5 10:43:14 bamboo2 logger: (django-debian for package ): starting postrm script: lava-server upgrade 0.5.1-0ubuntu0~lava1
Oct 5 10:43:14 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 5 10:43:14 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 5 10:43:14 bamboo2 logger: (django-debian for package lava-server): removing lava-server extension: lava-dashboard
Oct 5 10:43:14 bamboo2 logger: (django-debian for package lava-server): Preparing to run python code necessary for further configuration
Oct 5 10:43:15 bamboo2 snmpd[1206]: error on subcontainer 'ia_addr' insert (-1)
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Rebuilding cache of static files
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Synchronizing database
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Migrating database with south
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Configuring web server
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Enabling WSGI (Web Service Gateway Interface) module if necessary
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Genarating integration files for apache2
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Genarating wsgi file: /etc/lava-server/web-server/apache2/standard.wsgi
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Genarating apache2 configuration file: /etc/lava-server/web-server/apache2/standard.conf
Oct 5 10:43:18 bamboo2 logger: (django-debian for package lava-server): Restarting the web server
Oct 5 10:43:20 bamboo2 logger: (django-debian for package ): starting config script: lava-server configure 0.4~a1-0ubuntu0~lava1
Oct 5 10:43:20 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 5 10:43:20 bamboo2 logger: (django-debian for package ): starting postinst script: lava-server configure 0.4~a1-0ubuntu0~lava1
Oct 5 10:43:20 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 5 10:43:20 bamboo2 logger: (django-debian for package lava-server): Setting up dbconfig-common configuration file
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): Preparing to run python code necessary for further configuration
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): Rebuilding cache of static files
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): Synchronizing database
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): Migrating database with south
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): Configuring web server
Oct 5 10:43:21 bamboo2 logger: (django-debian for package lava-server): Enabling WSGI (Web Service Gateway Interface) module if necessary
Oct 5 10:43:22 bamboo2 logger: (django-debian for package lava-server): Genarating integration files for apache2
Oct 5 10:43:22 bamboo2 logger: (django-debian for package lava-server): Genarating wsgi file: /etc/lava-server/web-server/apache2/standard.wsgi
Oct 5 10:43:22 bamboo2 logger: (django-debian for package lava-server): Genarating apache2 configuration file: /etc/lava-server/web-server/apache2/standard.conf
Oct 5 10:43:22 bamboo2 logger: (django-debian for package lava-server): Restarting the web server
Oct 5 10:43:22 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 5 10:43:22 bamboo2 logger: (django-debian for package lava-server): installing lava-server extension: lava-dashboard
Oct 5 10:43:22 bamboo2 logger: (django-debian for package lava-server): Preparing to run python code necessary for further configuration
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Rebuilding cache of static files
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Synchronizing database
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Migrating database with south
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Configuring web server
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Enabling WSGI (Web Service Gateway Interface) module if necessary
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Genarating integration files for apache2
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Genarating wsgi file: /etc/lava-server/web-server/apache2/standard.wsgi
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Genarating apache2 configuration file: /etc/lava-server/web-server/apache2/standard.conf
Oct 5 10:43:23 bamboo2 logger: (django-debian for package lava-server): Restarting the web server
Oct 5 10:43:45 bamboo2 snmpd[1206]: error on subcontainer 'ia_addr' insert (-1)
Oct 5 10:43:49 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 5 10:43:49 bamboo2 logger: (django-debian for package lava-server): removing lava-server extension: lava-scheduler
Oct 5 10:43:49 bamboo2 logger: (django-debian for package lava-server): Preparing to run python code necessary for further configuration
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Rebuilding cache of static files
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Synchronizing database
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Migrating database with south
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Configuring web server
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Enabling WSGI (Web Service Gateway Interface) module if necessary
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Genarating integration files for apache2
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Genarating wsgi file: /etc/lava-server/web-server/apache2/standard.wsgi
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Genarating apache2 configuration file: /etc/lava-server/web-server/apache2/standard.conf
Oct 5 10:43:50 bamboo2 logger: (django-debian for package lava-server): Restarting the web server
Oct 5 10:43:52 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 5 10:43:52 bamboo2 logger: (django-debian for package lava-server): installing lava-server extension: lava-scheduler
Oct 5 10:43:52 bamboo2 logger: (django-debian for package lava-server): Preparing to run python code necessary for further configuration
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): Rebuilding cache of static files
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): Synchronizing database
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): Migrating database with south
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 22, in <module>
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): from django_seatbelt import seatbelt
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): ImportError: No module named django_seatbelt
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): Configuring web server
Oct 5 10:43:53 bamboo2 logger: (django-debian for package lava-server): Enabling WSGI (Web Service Gateway Interface) module if necessary
Oct 5 10:43:54 bamboo2 logger: (django-debian for package lava-server): Genarating integration files for apache2
Oct 5 10:43:54 bamboo2 logger: (django-debian for package lava-server): Genarating wsgi file: /etc/lava-server/web-server/apache2/standard.wsgi
Oct 5 10:43:54 bamboo2 logger: (django-debian for package lava-server): Genarating apache2 configuration file: /etc/lava-server/web-server/apache2/standard.conf
Oct 5 10:43:54 bamboo2 logger: (django-debian for package lava-server): Restarting the web server

Zygmunt Krynicki (zyga) said : #5

Odd, could you please try installing django-seatbelt package from our ppa and try again (reconfiguring lava-server)

David Schwarz (david-schwarz) said : #6

It's acting like the package isn't there--I even re-added the ppa to be sure:

bamboo2:~> sudo apt-get install django-seatbelt
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package django-seatbelt

bamboo2:~> sudo add-apt-repository ppa:linaro-validation/ppa
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv A34420D10361E7F20484438E7A5415CDB4487581
gpg: requesting key B4487581 from hkp server keyserver.ubuntu.com
gpg: key B4487581: "Launchpad PPA for Linaro Validation Team" not changed
gpg: Total number processed: 1
gpg: unchanged: 1

bamboo2:~> sudo apt-get update
<snip>

bamboo2:~> sudo apt-get install django-seatbelt
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package django-seatbelt

Zygmunt Krynicki (zyga) said : #7

Ah, my mistake. I used the source package name (django-seatbelt) while you should install the binary package name python-django-seatbelt.

Could you please install that instead, then reconfigure lava-server and check if it fixed the problem?e

David Schwarz (david-schwarz) said : #8

I reconfigured lava-server with django-seatbelt installed, but still no dice. Here's the syslog of the reconfiguration:

Oct 6 09:11:28 bamboo2 logger: (django-debian for package ): starting prerm script: lava-server upgrade 0.5.1-0ubuntu0~lava1
Oct 6 09:11:28 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 6 09:11:28 bamboo2 logger: (django-debian for package lava-server): De-configuring web server
Oct 6 09:11:28 bamboo2 logger: (django-debian for package lava-server): Removing generated web server integration files
Oct 6 09:11:28 bamboo2 logger: (django-debian for package lava-server): Restarting apache2 web server
Oct 6 09:11:29 bamboo2 logger: (django-debian for package ): starting config script: lava-server reconfigure 0.5.1-0ubuntu0~lava1
Oct 6 09:11:29 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 6 09:11:31 bamboo2 logger: (django-debian for package ): starting postinst script: lava-server configure 0.5.1-0ubuntu0~lava1
Oct 6 09:11:31 bamboo2 logger: (django-debian for package lava-server): Loading web server integration files for apache2
Oct 6 09:11:31 bamboo2 logger: (django-debian for package lava-server): Setting up dbconfig-common configuration file
Oct 6 09:11:32 bamboo2 logger: (django-debian for package lava-server): Preparing to run python code necessary for further configuration
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): Rebuilding cache of static files
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): 147 static files built.
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): Synchronizing database
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): Syncing...
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): No fixtures found.
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server):
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): Synced:
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > django.contrib.auth
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > django.contrib.contenttypes
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > django.contrib.markup
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > django.contrib.sessions
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > django.contrib.sites
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > django_openid_auth
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > staticfiles
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > django.contrib.admin
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > linaro_django_xmlrpc
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > lava_markitup
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > south
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): > linaro_django_pagination
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server):
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): Not synced (use migrations):
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): - dashboard_app
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): - lava_projects
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): - lava_scheduler_app
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): (use ./manage.py migrate to migrate these)
Oct 6 09:11:33 bamboo2 logger: (django-debian for package lava-server): Migrating database with south
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): Running migrations for dashboard_app:
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): - Migrating forwards to 0010_denormalize_test_run.
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): > dashboard_app:0005_auto__chg_field_softwarepackage_version__chg_field_softwarepackage_nam
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): > dashboard_app:0006_auto__chg_field_bundledeserializationerror_bundle
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): > dashboard_app:0007_auto__add_tag
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): > dashboard_app:0008_auto__add_testingeffort
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): Traceback (most recent call last):
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 37, in <module>
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): main()
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/lava-server/manage.py", line 34, in main
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): execute_manager(settings)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/django/core/management/__init__.py", line 438, in execute_manager
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): utility.execute()
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/django/core/management/__init__.py", line 379, in execute
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): self.fetch_command(subcommand).run_from_argv(self.argv)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/django/core/management/base.py", line 191, in run_from_argv
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): self.execute(*args, **options.__dict__)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/django/core/management/base.py", line 220, in execute
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): output = self.handle(*args, **options)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/south/management/commands/migrate.py", line 105, in handle
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): ignore_ghosts = ignore_ghosts,
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/south/migration/__init__.py", line 191, in migrate_app
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): success = migrator.migrate_many(target, workplan, database)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/south/migration/migrators.py", line 221, in migrate_many
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): result = migrator.__class__.migrate_many(migrator, target, migrations, database)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/south/migration/migrators.py", line 292, in migrate_many
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): result = self.migrate(migration, database)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/south/migration/migrators.py", line 125, in migrate
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): result = self.run(migration)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/south/migration/migrators.py", line 99, in run
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): return self.run_migration(migration)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/south/migration/migrators.py", line 82, in run_migration
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): south.db.db.execute_deferred_sql()
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/south/db/generic.py", line 184, in execute_deferred_sql
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): self.execute(sql)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/south/db/generic.py", line 150, in execute
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): cursor.execute(sql, params)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): File "/usr/lib/pymodules/python2.7/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): return self.cursor.execute(query, args)
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): django.db.utils.DatabaseError: relation "lava_projects_project" does not exist
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server):
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): Configuring web server
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): Enabling WSGI (Web Service Gateway Interface) module if necessary
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): Genarating integration files for apache2
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): Genarating wsgi file: /etc/lava-server/web-server/apache2/standard.wsgi
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): Genarating apache2 configuration file: /etc/lava-server/web-server/apache2/standard.conf
Oct 6 09:11:34 bamboo2 logger: (django-debian for package lava-server): Restarting the web server

Best Zygmunt Krynicki (zyga) said : #9

Let's try to run the migrations one at a time:

$ sudo -u www-data lava-server manage migrate lava_projects
$ sudo -u www-data lava-server manage migrate dashboard_app
$ sudo -u www-data lava-server manage migrate lava_scheduler_app

I believe that the root cause of this issue is:

1) Missing dependency (or too weak dependency) on python-django-seatbelt
2) Missing dependency between migrations.

David Schwarz (david-schwarz) said : #10

That worked. Thank you.