I forgot to reply to this.

I left some hints in this other 
thread: https://groups.google.com/d/msg/openwisp/0Qh-TRAeoLE/BnpMZkvlAgAJ
There's a playbook file shared in that thread as well 
<https://docs.google.com/viewer?a=v&pid=forums&srcid=MDY5OTA0NjI2NTkzOTQ2Nzk2ODkBMTM1NjE4NzI5MjUxODc3Nzg4MzIBQm5wTVprdmxBZ0FKATAuMgEBdjI&authuser=0>,
 
I suggest following the thread until the end.

The problem is that the new modules are evolving rapidly so new settings 
may be needed.

We have open issues to add support for openwisp-monitoring 
<https://github.com/openwisp/ansible-openwisp2/issues/195>, 
openwisp-firmware-upgrader 
<https://github.com/openwisp/ansible-openwisp2/issues/199> and 
openwisp-radius <https://github.com/openwisp/ansible-openwisp2/issues/198> in 
ansible-openwisp2 but so far no one is working on these.
I hope that more users and contributors will be willing to help out.
The test project of each module provides a working settings.py file that 
can be used as reference.

I hope this helps, I can't do more at the moment unfortunately.

Best regards
Federico


On Thursday, October 8, 2020 at 10:16:55 AM UTC-5, Ian Tait wrote:
>
> Hi, 
>
> So now I'm trying to install openwisp_monitoring using a playbook from 
> https://groups.google.com/d/msg/openwisp/WuhK5rJJTX8/H0RIZoMKAgAJ 
>
> Running the playbook errors out at the migrate stage: 
> Any ideas? Thanks! 
>
> TASK [openwisp.openwisp2 : migrate] 
> ***************************************************************************************************************************
>  
>
> fatal: [openwisp3.taitcorp.com]: FAILED! => {"changed": false, "cmd": 
> "./manage.py migrate --noinput", "msg": "\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.6/site-packages/django/core/management/__init__.py\",
>  
> line 401, in execute_from_command_line\n utility.execute()\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/core/management/__init__.py\",
>  
> line 377, in execute\n django.setup()\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/__init__.py\", line 
> 24, in setup\n apps.populate(settings.INSTALLED_APPS)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/apps/registry.py\", 
> line 91, in populate\n app_config = AppConfig.create(entry)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/apps/config.py\", 
> line 116, in create\n mod = import_module(mod_path)\n File 
> \"/opt/openwisp2/env/lib/python3.6/importlib/__init__.py\", line 126, in 
> import_module\n return _bootstrap._gcd_import(name[level:], package, 
> level)\n File \"<frozen importlib._bootstrap>\", line 994, in _gcd_import\n 
> File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\n File 
> \"<frozen importlib._bootstrap>\", line 955, in _find_and_load_unlocked\n 
> File \"<frozen importlib._bootstrap>\", line 665, in _load_unlocked\n File 
> \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\n File 
> \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n 
> File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/openwisp_monitoring/monitoring/apps.py\",
>  
> line 9, in <module>\n from .configuration import get_metric_configuration, 
> register_metric_notifications\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/openwisp_monitoring/monitoring/configuration.py\",
>  
> line 3, in <module>\n from openwisp_notifications.types import 
> (\nModuleNotFoundError: No module named 'openwisp_notifications'\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_w82ylaym/ansible_django_manage_payload.zip",
>  
> "/usr/lib/python36.zip", "/usr/lib/python3.6", 
> "/usr/lib/python3.6/lib-dynload", "/usr/local/lib/python3.6/dist-packages", 
> "/usr/local/lib/python3.6/dist-packages/openwisp_monitoring-0.1-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/swapper-1.1.2.post1-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/openwisp_controller-0.7.post1-py3.6.egg",
>  
> "/usr/local/lib/python3.6/dist-packages/influxdb-5.3.0-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_nested_admin-3.3.2-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_celery_email-3.0.0-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_cache_memoize-0.1.7-py3.6.egg",
>  
> "/usr/local/lib/python3.6/dist-packages/drf_yasg-1.17.1-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/djangorestframework-3.11.2-py3.6.egg",
>  
> "/usr/local/lib/python3.6/dist-packages/django_filter-2.4.0-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_model_utils-4.0.0-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/scp-0.13.2-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/redis-3.5.3-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/paramiko-2.7.2-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/openwisp_users-0.2.2-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/djangorestframework_gis-0.15-py3.6.egg",
>  
> "/usr/local/lib/python3.6/dist-packages/django_netjsonconfig-0.12-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_loci-0.3.4-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/celery-4.4.7-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/msgpack-0.6.1-py3.6-linux-x86_64.egg",
>  
> "/usr/local/lib/python3.6/dist-packages/python_monkey_business-1.0.0-py3.6.egg",
>  
> "/usr/local/lib/python3.6/dist-packages/Django-3.0-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_appconf-1.0.4-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/uritemplate-3.0.1-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/ruamel.yaml-0.16.12-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/packaging-20.4-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/inflection-0.5.1-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/coreschema-0.0.4-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/coreapi-2.3.3-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/PyNaCl-1.4.0-py3.6-linux-x86_64.egg", 
> "/usr/local/lib/python3.6/dist-packages/cryptography-3.1.1-py3.6-linux-x86_64.egg",
>  
> "/usr/local/lib/python3.6/dist-packages/bcrypt-3.2.0-py3.6-linux-x86_64.egg", 
> "/usr/local/lib/python3.6/dist-packages/phonenumbers-8.11.5-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_phonenumber_field-4.0.0-py3.6.egg",
>  
> "/usr/local/lib/python3.6/dist-packages/django_organizations-1.1.2-py3.6.egg",
>  
> "/usr/local/lib/python3.6/dist-packages/django_extensions-2.2.9-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_allauth-0.41.0-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/sqlparse-0.4.1-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/asgiref-3.2.10-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/netjsonconfig-0.8.2-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_x509-0.6.2-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_taggit-1.2.0-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_sortedm2m-3.0.2-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/django_reversion-3.0.8-py3.6.egg", 
> "/usr/local/lib/python3.6/dist-packages/openwisp_utils-0.6-py3.6.egg", 
> "/usr/lib/python3/dist-packages"]} 
>
> On 07/10/2020 19:22 Ian Tait <[email protected]> wrote: 
>
>
> Hi, 
>
> I commented out the network topology module in the playbook, whilst I 
> figure out the below, and it successfully completed. 
>
> Where would I put the line 'openwisp2_network_topology_version: "0.5"' 
>
> Thank you very much. 
>
> On 07/10/2020 18:37 Federico Capoano  wrote: 
>
>
> I see you're using the topology module, I didn't notice that before. 
>
> Try to add this in your variables: 
>
> openwisp2_network_topology_version: "0.5" 
>
> Federico 
>
> On Wed, Oct 7, 2020 at 12:26 PM Ian Tait <[email protected]> wrote: 
>
> Hi, 
>
> Thanks for that - here is the output of that command 
>
> >>> Config.objects.filter(status='down').update(status='applied') 
> 0 
>
> running the ansible playbook again afterwards results in the original 
> error. 
>
> Thanks. 
>
> On 07/10/2020 15:54 Federico Capoano wrote: 
>
>
> Ok now I understand.  
>
> Try the following: 
>
> cd /opt/openwisp2 
> source env/bin/activate 
> ./manage.py shell_plus 
>
> # the python/django shell will open 
> Config.objects.filter(status='down').update(status='applied') 
>
> This will fix the config status of your application. 
> Seems that somebody did customize the config status to add "down", 
> probably the customization was lost during the upgrade. 
> However, to know if a device is reachable or not, I recommend using the 
> monitoring 
> module of OpenWISP <https://github.com/openwisp/openwisp-monitoring/>. 
>
> Here you can see a demo: https://youtu.be/KN0xtej_L9I?t=3807 
>
> There's a thread in which I shared a sample playbook with the 
> configuration needed to deploy it: 
> https://groups.google.com/d/msg/openwisp/WuhK5rJJTX8/H0RIZoMKAgAJ 
>
> I hope this helps. 
> Federico 
>
>
>
> On Wed, Oct 7, 2020 at 6:05 AM Ian Tait <[email protected]> wrote: 
>
> Hi, 
>
> More output below, thanks. 
>
> ansible-galaxy install --force openwisp.openwisp2 
> - changing role openwisp.openwisp2 from 0.10.0 to unspecified 
> - downloading role 'openwisp2', owned by openwisp 
> - downloading role from 
> https://github.com/openwisp/ansible-openwisp2/archive/0.11.0.tar.gz 
> - extracting openwisp.openwisp2 to 
> /Users/administrator/.ansible/roles/openwisp.openwisp2 
> - openwisp.openwisp2 (0.11.0) was installed successfully 
> - dependency Stouts.postfix is already installed, skipping. 
> administrator@gnc openwisp2-ansible-playbook % ansible-playbook -i hosts 
> playbook.yml -u administrator -k --become -K 
>
> and the output from the 'migrate' section: 
>
> TASK [openwisp.openwisp2 : migrate] 
> *********************************************************************************************************************************************************
>  
>
> fatal: [openwisp3.taitcorp.com]: FAILED! => {"changed": false, "cmd": 
> "./manage.py migrate --noinput", "msg": "stdout: Operations to perform:\n 
> Apply all migrations: account, admin, auth, config, connection, 
> contenttypes, geo, openwisp_users, pki, reversion, sessions, sites, 
> socialaccount, topology\nRunning migrations:\n Applying 
> openwisp_users.0008_update_admins_permissions... OK\n Applying 
> openwisp_users.0009_create_organization_owners... OK\n Applying 
> openwisp_users.0010_allow_admins_change_organization... OK\n Applying 
> openwisp_users.0011_user_first_name_150_max_length... OK\n Applying 
> topology.0011_fix_link_properties...\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.6/site-packages/django/core/management/__init__.py\",
>  
> line 401, in execute_from_command_line\n utility.execute()\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/core/management/__init__.py\",
>  
> line 395, in execute\n 
> self.fetch_command(subcommand).run_from_argv(self.argv)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/core/management/base.py\",
>  
> line 328, in run_from_argv\n self.execute(*args, **cmd_options)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/core/management/base.py\",
>  
> line 369, in execute\n output = self.handle(*args, **options)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/core/management/base.py\",
>  
> line 83, in wrapped\n res = handle_func(*args, **kwargs)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/core/management/commands/migrate.py\",
>  
> line 233, in handle\n fake_initial=fake_initial,\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/db/migrations/executor.py\",
>  
> line 117, in migrate\n state = self._migrate_all_forwards(state, plan, 
> full_plan, fake=fake, fake_initial=fake_initial)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/db/migrations/executor.py\",
>  
> line 147, in _migrate_all_forwards\n state = self.apply_migration(state, 
> migration, fake=fake, fake_initial=fake_initial)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/db/migrations/executor.py\",
>  
> line 245, in apply_migration\n state = migration.apply(state, 
> schema_editor)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/db/migrations/migration.py\",
>  
> line 124, in apply\n operation.database_forwards(self.app_label, 
> schema_editor, old_state, project_state)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/db/migrations/operations/special.py\",
>  
> line 190, in database_forwards\n self.code(from_state.apps, 
> schema_editor)\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/openwisp_network_topology/migrations/__init__.py\",
>  
> line 34, in fix_link_properties\n link.full_clean()\n File 
> \"/opt/openwisp2/env/lib/python3.6/site-packages/django/db/models/base.py\", 
> line 1222, in full_clean\n raise 
> ValidationError(errors)\ndjango.core.exceptions.ValidationError: {'status': 
> [\"Value 'down' is not a valid choice.\"]}\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_13scn343/ansible_django_manage_payload.zip",
>  
> "/usr/lib/python36.zip", "/usr/lib/python3.6", 
> "/usr/lib/python3.6/lib-dynload", "/usr/local/lib/python3.6/dist-packages", 
> "/usr/lib/python3/dist-packages"]} 
>
> On 06/10/2020 17:24 Federico Capoano wrote: 
>
>
> Dear Ian, 
>
> 0.10 -> 0.11, which module is that? 
>
> The error is mentioning status "down", which is not valid under any 
> module. A value like that makes sense in the monitoring module (
> https://github.com/openwisp/openwisp-monitoring/), but the definitions 
> used are "problem" and "critical", the labels can be changed however, so 
> that "critical" can be relabeled to "down", if preferred, but the 
> monitoring module is not even at version 0.1 yet. 
>
> Best regards 
> Federico 
>
>
> On Tue, Oct 6, 2020 at 5:20 AM Ian Tait <[email protected]> wrote: 
>
> Hi, 
>
> Upgrading from 0.10 -> 0.11, getting an error in the migrate section: 
>
> line 1222, in full_clean\n raise 
> ValidationError(errors)\ndjango.core.exceptions.ValidationError: {'status': 
> [\"Value 'down' is not a valid choice.\"]} 
>
> Is that something that I can fix? 
>
> Thanks. 
>
> Ian 
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "OpenWISP" group. 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected]. 
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/openwisp/193309916.233450.1601979648704%40privateemail.com
>  
> (
> https://groups.google.com/d/msgid/openwisp/193309916.233450.1601979648704%40privateemail.com?utm_medium=email&utm_source=footer).
>  
>
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "OpenWISP" group. 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected]. 
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/openwisp/CAERYH6WUyXhbHQkNk2R2u5zhwEexPT%3DK-4HVn0mnC27mv12QGQ%40mail.gmail.com
>  
> (
> https://groups.google.com/d/msgid/openwisp/CAERYH6WUyXhbHQkNk2R2u5zhwEexPT%3DK-4HVn0mnC27mv12QGQ%40mail.gmail.com?utm_medium=email&utm_source=footer).
>  
>
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "OpenWISP" group. 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected]. 
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/openwisp/522883696.271286.1602068733092%40privateemail.com
>  
> <https://groups.google.com/d/msgid/openwisp/522883696.271286.1602068733092%40privateemail.com?utm_medium=email&utm_source=footer>.
>  
>
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "OpenWISP" group. 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected]. 
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/openwisp/CAERYH6WGcF_%3DsuyKv-u1%3DadzacrG%2BqZTDwDen%2Buin3nnzWCc8A%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/openwisp/CAERYH6WGcF_%3DsuyKv-u1%3DadzacrG%2BqZTDwDen%2Buin3nnzWCc8A%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>  
>
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "OpenWISP" group. 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected]. 
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/openwisp/865788313.8028.1602091611961%40privateemail.com
>  
> <https://groups.google.com/d/msgid/openwisp/865788313.8028.1602091611961%40privateemail.com?utm_medium=email&utm_source=footer>.
>  
>
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "OpenWISP" group. 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected]. 
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/openwisp/CAERYH6WQbhktUHcjjCQR9DuQv5U99jgdX%3DSX%2BJdEDkWmoFuK5A%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/openwisp/CAERYH6WQbhktUHcjjCQR9DuQv5U99jgdX%3DSX%2BJdEDkWmoFuK5A%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>  
>
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "OpenWISP" group. 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected]. 
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/openwisp/1558850588.9479.1602094941069%40privateemail.com
>  
> <https://groups.google.com/d/msgid/openwisp/1558850588.9479.1602094941069%40privateemail.com?utm_medium=email&utm_source=footer>.
>  
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/03dcb675-fc43-4212-a0b9-ea47200f1864o%40googlegroups.com.

Reply via email to