openwisp/ansible-openwisp2

Upgrade via ansible fails on Ubuntu 20.04.4 LTS

AndyX90 opened this issue · 1 comments

Hi,
i have a problem upgrading openwisp.
The upgrade via ansible results in

TASK [openwisp.openwisp2 : migrate] ******************************************************************************** fatal: [openwisp.mydomain]: FAILED! => {"changed": false, "cmd": ["./manage.py", "migrate", "--noinput"], "msg": "stdout: Operations to perform:\n Apply all migrations: account, admin, auth, authtoken, check, config, connection, contenttypes, device_monitoring, firmware_upgrader, geo, monitoring, openwisp_ipam, openwisp_notifications, openwisp_users, pki, reversion, sessions, sites, socialaccount, topology\nRunning migrations:\n Applying authtoken.0003_tokenproxy... OK\n Applying monitoring.0001_squashed_0023_alert_settings_tolerance_remove_default... OK\n Applying check.0001_initial_squashed_0002_check_unique_together... OK\n Applying check.0003_create_ping...\n:stderr: Traceback (most recent call last):\n File \"./manage.py\", line 10, in <module>\n execute_from_command_line(sys.argv)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/core/management/__init__.py\", line 446, in execute_from_command_line\n utility.execute()\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/core/management/__init__.py\", line 440, in execute\n self.fetch_command(subcommand).run_from_argv(self.argv)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/core/management/base.py\", line 414, in run_from_argv\n self.execute(*args, **cmd_options)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/core/management/base.py\", line 460, in execute\n output = self.handle(*args, **options)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/core/management/base.py\", line 98, in wrapped\n res = handle_func(*args, **kwargs)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/core/management/commands/migrate.py\", line 290, in handle\n post_migrate_state = executor.migrate(\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/migrations/executor.py\", line 131, in migrate\n state = self._migrate_all_forwards(\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/migrations/executor.py\", line 163, in _migrate_all_forwards\n state = self.apply_migration(\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/migrations/executor.py\", line 248, in apply_migration\n state = migration.apply(state, schema_editor)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/migrations/migration.py\", line 131, in apply\n operation.database_forwards(\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/migrations/operations/special.py\", line 193, in database_forwards\n self.code(from_state.apps, schema_editor)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/openwisp_monitoring/check/migrations/0003_create_ping.py\", line 14, in create_device_ping\n auto_create_ping(\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/celery/local.py\", line 188, in __call__\n return self._get_current_object()(*a, **kw)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/celery/app/task.py\", line 392, in __call__\n return self.run(*args, **kwargs)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/openwisp_monitoring/check/tasks.py\", line 63, in auto_create_ping\n has_check = Check.objects.filter(\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/models/manager.py\", line 85, in manager_method\n return getattr(self.get_queryset(), name)(*args, **kwargs)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/models/query.py\", line 1071, in filter\n return self._filter_or_exclude(False, args, kwargs)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/models/query.py\", line 1089, in _filter_or_exclude\n clone._filter_or_exclude_inplace(negate, args, kwargs)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/models/query.py\", line 1096, in _filter_or_exclude_inplace\n self._query.add_q(Q(*args, **kwargs))\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/models/sql/query.py\", line 1502, in add_q\n clause, _ = self._add_q(q_object, self.used_aliases)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/models/sql/query.py\", line 1532, in _add_q\n child_clause, needed_inner = self.build_filter(\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/models/sql/query.py\", line 1377, in build_filter\n lookups, parts, reffed_expression = self.solve_lookup_type(arg)\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/models/sql/query.py\", line 1187, in solve_lookup_type\n _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())\n File \"/opt/openwisp2/env/lib/python3.8/site-packages/django/db/models/sql/query.py\", line 1677, in names_to_path\n raise FieldError(\ndjango.core.exceptions.FieldError: Cannot resolve keyword 'check_type' into field. Choices are: active, check, content_type, content_type_id, created, description, id, modified, name, object_id, params\n", "path": "/opt/openwisp2/env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin", "syspath": ["/tmp/ansible_django_manage_payload_472evo6k/ansible_django_manage_payload.zip", "/usr/lib/python38.zip", "/usr/lib/python3.8", "/usr/lib/python3.8/lib-dynload", "/usr/local/lib/python3.8/dist-packages", "/usr/lib/python3/dist-packages"]}

Any help would be appreciated.

Closing this as it's a duplicate of openwisp/openwisp-monitoring#348.