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)
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
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
Hi Remi,
Von: Remi Duraffort remi.duraffort@linaro.org Gesendet: Dienstag, 25. Juli 2023 10:28 An: Tim Jaacks tim.jaacks@seco.com Cc: lava-users@lists.lavasoftware.org Betreff: Re: [Lava-users] Error upgrading to lava-server 2023.06
Hello,
Le lun. 17 juil. 2023 à 10:10, Tim Jaacks mailto: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).
Thanks for your reply. I get the same error as above when I run `lava-server manage migrate`. Usually migrations are automatically run during update, aren't they?
This is the output of `lava-server manage showmigrations`:
admin [X] 0001_initial [X] 0002_logentry_remove_auto_add [X] 0003_logentry_add_action_flag_choices auth [X] 0001_initial [X] 0002_alter_permission_name_max_length [X] 0003_alter_user_email_max_length [X] 0004_alter_user_username_opts [X] 0005_alter_user_last_login_null [X] 0006_require_contenttypes_0002 [X] 0007_alter_validators_add_error_messages [X] 0008_alter_user_username_max_length [X] 0009_alter_user_last_name_max_length [X] 0010_alter_group_name_max_length [X] 0011_update_proxy_permissions authtoken [X] 0001_initial [X] 0002_auto_20160226_1747 [X] 0003_tokenproxy contenttypes [X] 0001_initial [X] 0002_remove_content_type_name lava_results_app [X] 0001_initial [X] 0002_auto_20150825_1926 [X] 0003_auto_20150908_1522 [X] 0004_auto_20150925_0002 [X] 0005_auto_20151124_1419 [X] 0006_auto_20160111_1318 [X] 0007_auto_20160225_1256 [X] 0008_auto_20160405_1543 [X] 0009_query_limit [X] 0010_auto_20160504_0814 [X] 0011_namedtestattribute [X] 0012_namedtestattribute_metadata [X] 0013_buglinks [X] 0014_xaxis_maxlength_increase [X] 0015_add_test_case_result_index [X] 0016_add_testcase_start_end_tc [X] 0017_testdata_onetoone_field [X] 0018_drop_buglink [X] 0019_update_query_contenttype [ ] 0019_auto_20230307_1545 [ ] 0020_merge_20230717_0743 lava_scheduler_app [X] 0001_initial [X] 0002_add_lava-health_user [X] 0003_populate_master_node [X] 0004_add_pipeline_marks [X] 0005_auto_devicedictionarytable_pipelinestore [X] 0006_auto_20150619_1035 [X] 0007_devicetype_description [X] 0008_auto_20151014_1044 [X] 0009_testjob_pipeline_compatibility [X] 0010_auto_20151103_1136 [X] 0011_remove_testjob_log_file [X] 0012_auto_20160208_1600 [X] 0013_auto_20160302_0404 [X] 0014_add_testjob_index [X] 0015_drop_heartbeat [X] 0016_index_testjob_submit_time [X] 0017_custompermissions [X] 0018_notifications [X] 0019_extendeduser [X] 0020_notificationrecipient_uniquetogether [X] 0021_blacklist_to_array [X] 0022_create_devicetype_alias [X] 0023_update_aliases [X] 0024_do_not_cascade_deletions [X] 0025_switch_job_status_trigger_type [X] 0026_devicetype_disable_health_check [X] 0027_device_dict_onto_filesystem [X] 0028_notify_callback [X] 0029_remove_testjob__results_bundle [X] 0030_unused_scheduler_fields [X] 0031_add_worker_state_and_health [X] 0032_add_state_health_to_testjob_and_device [X] 0033_remove_old_status_fields [X] 0034_worker_last_ping [X] 0035_remove_testjob__results_link [X] 0036_remove_is_pipeline [X] 0037_notify_callback_separation [X] 0038_set_default_device_health_maintenance [X] 0039_remove_testjob_admin_notifications [X] 0040_change_device_type_alias [X] 0041_notification_charfield_to_textfield [X] 0042_add-table-length-setting [X] 0043_auth_refactoring [X] 0044_reintroduce_cancel_resubmit_permission [X] 0045_remove_submit_testjob_perm [X] 0046_permission_consolidation [X] 0047_job_limit [X] 0048_job_limit_constraint [X] 0049_add_worker_auth [X] 0050_worker_version [X] 0051_worker_master_version_notified [X] 0052_device_is_synced [X] 0053_testjob_and_worker_token [X] 0054_remoteartifactsauth [X] 0055_notificationcallback_header [X] 0056_testjob_queue_timeout [ ] 0057_dt_permissions_worker_master_version [ ] 0058_add_testjob_view_performance_indexes [ ] 0057_auto_20230307_1545 [ ] 0059_merge_20230717_0743 linaro_django_xmlrpc [X] 0001_initial sessions [X] 0001_initial sites [X] 0001_initial [X] 0002_alter_domain_unique
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: mailto:tim.jaacks@seco.com
Register: Amtsgericht Hamburg, HRB 148893 Represented by: Dirk Finstel, Marc-Michael Braun, Massimo Mauri _______________________________________________ Lava-users mailing list -- mailto:lava-users@lists.lavasoftware.org To unsubscribe send an email to mailto: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
On Tue, Jul 25, 2023 at 9:28 AM Remi Duraffort remi.duraffort@linaro.org wrote:
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).
I ran into the same issue during upgrade to 2023.06. There are 2 migrations that were generated automatically (lava_results_app.0019_auto_20230307_1545 amd one more I don't remember the name). When upgraded package is downloaded and installed, the migration files are not removed (I'm not sure why). Same happened when I try to remove lava-server and install fresh package using existing database. The solution was to downgrade to "old" version, remove automatically generated migrations (lava-server manage migrate <migration before the automatic one>), manually remove the automatic migration files and only then upgrade to 2023.06. I didn't debug any further but I believe it's possible to reproduce on a clean environment (for example inside a docker container).
Hope this helps.
Best Regards, Milosz
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 _______________________________________________ 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
Hi Milosz,
-----Ursprüngliche Nachricht----- Von: Milosz Wasilewski milosz.wasilewski@foundries.io Gesendet: Dienstag, 25. Juli 2023 10:57 An: Remi Duraffort remi.duraffort@linaro.org Cc: Tim Jaacks tim.jaacks@seco.com; lava-users@lists.lavasoftware.org Betreff: Re: [Lava-users] Re: Error upgrading to lava-server 2023.06
On Tue, Jul 25, 2023 at 9:28 AM Remi Duraffort remi.duraffort@linaro.org wrote:
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).
I ran into the same issue during upgrade to 2023.06. There are 2 migrations that were generated automatically (lava_results_app.0019_auto_20230307_1545 amd one more I don't remember the name). When upgraded package is downloaded and installed, the migration files are not removed (I'm not sure why). Same happened when I try to remove lava-server and install fresh package using existing database. The solution was to downgrade to "old" version, remove automatically generated migrations (lava-server manage migrate <migration before the automatic one>), manually remove the automatic migration files and only then upgrade to 2023.06. I didn't debug any further but I believe it's possible to reproduce on a clean environment (for example inside a docker container).
Thanks for the hint. Can you tell me how you downgraded lava-server? Did you install the Debian repo version? Via apt I can otherwise only install the most recent LAVA version from the lavasoftware repo.
Hope this helps.
Best Regards, Milosz
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 _______________________________________________ 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
On Fri, Aug 11, 2023 at 6:52 AM Tim Jaacks tim.jaacks@seco.com wrote:
Hi Milosz,
-----Ursprüngliche Nachricht----- Von: Milosz Wasilewski milosz.wasilewski@foundries.io Gesendet: Dienstag, 25. Juli 2023 10:57 An: Remi Duraffort remi.duraffort@linaro.org Cc: Tim Jaacks tim.jaacks@seco.com; lava-users@lists.lavasoftware.org Betreff: Re: [Lava-users] Re: Error upgrading to lava-server 2023.06
On Tue, Jul 25, 2023 at 9:28 AM Remi Duraffort remi.duraffort@linaro.org wrote:
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).
I ran into the same issue during upgrade to 2023.06. There are 2 migrations that were generated automatically (lava_results_app.0019_auto_20230307_1545 amd one more I don't remember the name). When upgraded package is downloaded and installed, the migration files are not removed (I'm not sure why). Same happened when I try to remove lava-server and install fresh package using existing database. The solution was to downgrade to "old" version, remove automatically generated migrations (lava-server manage migrate <migration before the automatic one>), manually remove the automatic migration files and only then upgrade to 2023.06. I didn't debug any further but I believe it's possible to reproduce on a clean environment (for example inside a docker container).
Thanks for the hint. Can you tell me how you downgraded lava-server? Did you install the Debian repo version? Via apt I can otherwise only install the most recent LAVA version from the lavasoftware repo.
I was lucky to use 2022.11.1 which is still available from apt.lavasoftware.org. These are your options from lava repositories:
lava-server_2020.01+9+stretch_all.deb lava-server_2021.11.0022.g08fafe4de+11+bullseye_all.deb lava-server_2022.11.1+10+buster_all.deb lava-server_2023.06+11+bullseye_all.deb lava-server_2023.06+12+bookworm_all.deb
2023.01-2 from bookworm should also do the job. Otherwise you will need to build the packages yourself.
Best Regards, Milosz
Hope this helps.
Best Regards, Milosz
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 _______________________________________________ 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
lava-users@lists.lavasoftware.org