Closed landam closed 8 years ago
Can't replicate using Vagrant.
Can you try to run "./manage.py syncdb --noinput --settings=djproject.settings" by hand ?
like this?
sudo python /opt/gislab/system/clients/web/www/manage.py syncdb --noinput --settings=djproject.settings
Traceback (most recent call last):
File "/opt/gislab/system/clients/web/www/manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
@landam, Python virtualenv must be activated before:
$ source /opt/gislab/clients/web/virtualenv/gislab-web/bin/activate
/opt/gislab/clients/web/virtualenv/gislab-web/bin/activate
is not found at my unit. I used:
source /opt/gislab/system/clients/web/virtualenv/gislab-web/bin/activate
python /opt/gislab/system/clients/web/www/manage.py syncdb --noinput --settings=djproject.settings
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table django_content_type
Creating table django_session
Creating table viewer_gislabuser_groups
Creating table viewer_gislabuser_user_permissions
Creating table viewer_gislabuser
Creating table viewer_project_registry
Creating table storage_ball
Creating table storage_drawing
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
works OK. I tried ansible again and it failed with same error message.
TASK [client-web : Sync database] **********************************************
fatal: [gislab-unit-roudnice]: FAILED! => {"changed": false, "cmd": "./manage.py syncdb --noinput --settings=djproject.settings", "failed": true, "msg": "[Errno 13] Permission denied", "rc": 13}
PLAY RECAP *********************************************************************
gislab-unit-roudnice : ok=287 changed=97 unreachable=0 failed=1
@landam , I have no idea. Can you SSH to machine and try to look where "Permission denied" is coming from (Django or from PostgreSQL database) ? Try to look at /storage/log/syslog
@landam, can you try once again with GISLAB_DEBUG_INSTALL: yes ?
Also, please check your Ansible version - $ ansible --version
It seems that my Ansible is executing this command differently:
cmd": "python manage.py syncdb --noinput --settings=djproject.settings
Similar issue: https://github.com/lorin/ansiblebook/issues/5
From documentation (all) I don't know where debug message should go, the output of ansible is the same, so probably somewhere else then to stdout?
I have
ansible 2.0.0.1
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
@landam, Ansible 2 is most probably the issue. Please downgrade to Ansible 1. I hope it will be OK than.
Thanks, I downgraded Ansible to 1.7 and it works.
When installing unit from scratch the installation process fails with