Hello,



Le lun. 17 juil. 2023 à 10:10, Tim Jaacks <tim.jaacks@seco.com> a écrit :
Hello,

I tried upgrading from lava-server 2023.03 to 2023.06 on Debian 11 and got the following error:

Setting up lava-server (2023.06+11+bullseye) ...
/var/run/postgresql:5432 - accepting connections Updating configuration:
* generate SECRET_KEY [SKIP]
* generate DATABASES [SKIP]
Run fixups:
* fix permissions:
  - /var/lib/lava-server/home/
  - /var/lib/lava-server/default/
  - /var/lib/lava-server/default/media/
  - /var/lib/lava-server/default/media/job-output/
  - /etc/lava-server/dispatcher-config/
  - /etc/lava-server/dispatcher.d/
  - /var/lib/lava-server/default/media/job-output/2017/
  - /etc/lava-server/dispatcher-config/devices/
  - /etc/lava-server/dispatcher-config/devices/*
  - /etc/lava-server/dispatcher-config/device-types/
  - /etc/lava-server/dispatcher-config/device-types/*
  - /etc/lava-server/dispatcher-config/health-checks/
  - /etc/lava-server/dispatcher-config/health-checks/*
* drop duplicated templates:
* fix permissions:
  - /etc/lava-server/settings.conf
  - /etc/lava-server/instance.conf
  - /var/log/lava-server/
  - /var/log/lava-server/*
  - /etc/lava-server/secret_key.conf
Create database:
psql -q
NOTICE:  not creating role lavaserver -- it already exists
NOTICE:  not creating role devel -- it already exists lava-server manage migrate --noinput --fake-initial Operations to perform:
  Apply all migrations: admin, auth, authtoken, contenttypes, lava_results_app, lava_scheduler_app, linaro_django_xmlrpc, sessions, sites Running migrations:
  Applying lava_results_app.0019_auto_20230307_1545...Traceback (most recent call last):
  File "/usr/bin/lava-server", line 55, in <module>
    main()
  File "/usr/bin/lava-server", line 51, in main
    execute_from_command_line([sys.argv[0]] + options.command)
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/django/core/management/commands/migrate.py", line 232, in handle
    post_migrate_state = executor.migrate(
  File "/usr/lib/python3/dist-packages/django/db/migrations/executor.py", line 117, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/usr/lib/python3/dist-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/usr/lib/python3/dist-packages/django/db/migrations/executor.py", line 245, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/lib/python3/dist-packages/django/db/migrations/migration.py", line 114, in apply
    operation.state_forwards(self.app_label, project_state)
  File "/usr/lib/python3/dist-packages/django/db/migrations/operations/models.py", line 256, in state_forwards
    state.remove_model(app_label, self.name_lower)
  File "/usr/lib/python3/dist-packages/django/db/migrations/state.py", line 100, in remove_model
    del self.models[app_label, model_name]
KeyError: ('lava_results_app', 'actiondata') migration
dpkg: error processing package lava-server (--configure):
 installed lava-server package post-installation script subprocess returned error exit status 1 Errors were encountered while processing:
 lava-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Have you already ran migrations?
Could you show the migrations on your system? (lava-server manage showmigrations).


 
Does anybody know what I can do in this case?
Uninstalling lava-server and installing it again does not resolve the issue.

Kind regards,
Tim

--
Tim Jaacks
SOFTWARE DEVELOPER
SECO Northern Europe GmbH

Schlachthofstrasse 20
21079 Hamburg
Germany
T: +49 40 791899-183
E: tim.jaacks@seco.com

Register: Amtsgericht Hamburg, HRB 148893 Represented by: Dirk Finstel, Marc-Michael Braun, Massimo Mauri
_______________________________________________
Lava-users mailing list -- lava-users@lists.lavasoftware.org
To unsubscribe send an email to lava-users-leave@lists.lavasoftware.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


--
Rémi Duraffort
Principal Tech Lead
Automation Software Team
Linaro