Problem during provisioning
bernhardkreuzer opened this issue · 4 comments
I followed the description from your documentation and get following error during vagrant up
System: OS X 10.11.3
VM: Parallels 11 Pro
==> default: TASK: [finalize | Fix filesystem rights] ************************************** ==> default: changed: [localhost] => (item={'path': '/home/vagrant/.config/', 'recurse': 'yes', 'mode': '0775'}) ==> default: ok: [localhost] => (item={'path': '/home/vagrant/.ssh/', 'recurse': 'no', 'mode': '0700'}) ==> default: changed: [localhost] => (item={'path': '/home/vagrant/.ssh/.ssh/authorized_keys', 'recurse': 'no', 'mode': '0600'}) ==> default: changed: [localhost] => (item={'path': '/home/vagrant/.ssh/.ssh/known_hosts', 'recurse': 'no', 'mode': '0644'}) ==> default: changed: [localhost] => (item={'path': '/home/vagrant/.ssh/.ssh/id_rsa', 'recurse': 'no', 'mode': '0600'}) ==> default: changed: [localhost] => (item={'path': '/home/vagrant/.ssh/.ssh/id_rsa.pub', 'recurse': 'no', 'mode': '0644'}) ==> default: changed: [localhost] => (item={'path': '/home/vagrant/tmp/', 'recurse': 'no', 'mode': '0775'}) ==> default: changed: [localhost] => (item={'path': '/usr/local/bin/', 'recurse': 'yes', 'mode': '0775'}) ==> default: failed: [localhost] => (item={'path': '/var/www/', 'recurse': 'no', 'mode': '0775'}) => {"failed": true, "gid": 20, "group": "dialout", "item": {"mode": "0775", "path": "/var/www/", "recurse": "no"}, "mode": "0755", "owner": "501", "path": "/var/www/", "size": 102, "state": "directory", "uid": 501} ==> default: msg: chown failed ==> default: ==> default: FATAL: all hosts have already failed -- aborting ==> default: ==> default: PLAY RECAP ******************************************************************** ==> default: to retry, use: --limit @/root/playbook.retry ==> default: localhost : ok=158 changed=105 unreachable=0 failed=1 The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.
I only changed in vm.yml the following lines:
# { type: 'home' } - { type: 'nfs', src: '/Users/bernhardkreuzer/Projects', target: '/var/www' }
and i tried also:
sharedFolder: - { type: 'home' } # { type: 'nfs', src: '/Users/bernhardkreuzer/Projects', target: '/var/www' }
always same problem.
Any idea?
There is an issue (file permission changes) with /var/www which was not designed to be a NFS mount but we can fix it.
BTW:
This VM is just an environment for docker and if you want to use docker from outside (eg. running docker-compose on your host) the paths must be same on host and guest because Docker doesn't know that you're using virtualisation).
That's why we mount /Users/bernhardkreuzer inside also as /Users/bernhardkreuzer to work mostly on host and don't need to jump into guest vm.
Same error here (on OS X host).
VM:
sharedFolder:
- { type: 'home' }
- { type: 'nfs', src: '~/Projects', target: '/var/www' }But got error:
==> default: TASK [finalize : Fix filesystem rights] ****************************************
==> default: ok: [localhost] => (item={u'path': u'/home/vagrant', u'recurse': u'no', u'mode': u'0755'})
==> default: ok: [localhost] => (item={u'path': u'/home/vagrant/.config/', u'recurse': u'yes', u'mode': u'0775'})
==> default: ok: [localhost] => (item={u'path': u'/home/vagrant/.ssh/', u'recurse': u'no', u'mode': u'0700'})
==> default: ok: [localhost] => (item={u'path': u'/home/vagrant/.ssh/.ssh/authorized_keys', u'recurse': u'no', u'mode': u'0600'})
==> default: ok: [localhost] => (item={u'path': u'/home/vagrant/.ssh/.ssh/known_hosts', u'recurse': u'no', u'mode': u'0644'})
==> default: ok: [localhost] => (item={u'path': u'/home/vagrant/.ssh/.ssh/id_rsa', u'recurse': u'no', u'mode': u'0600'})
==> default: ok: [localhost] => (item={u'path': u'/home/vagrant/.ssh/.ssh/id_rsa.pub', u'recurse': u'no', u'mode': u'0644'})
==> default: ok: [localhost] => (item={u'path': u'/home/vagrant/tmp/', u'recurse': u'no', u'mode': u'0775'})
==> default: ok: [localhost] => (item={u'path': u'/usr/local/bin/', u'recurse': u'yes', u'mode': u'0775'})
==> default: failed: [localhost] (item={u'path': u'/var/www/', u'recurse': u'no', u'mode': u'0775'}) => {"failed": true, "gid": 20, "group": "dialout", "item": {"mode": "0775", "path": "/var/www/", "recurse": "no"}, "mode": "0755", "msg": "chown failed", "owner": "501", "path": "/var/www/", "size": 442, "state": "directory", "uid": 501}
==> default:
==> default: PLAY RECAP *********************************************************************
==> default: localhost : ok=13 changed=2 unreachable=0 failed=1
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
How to fix or workaround this?
With ubuntu-16.04 branch? This piece of code in the provisioning should be removed to get rid of the provision error if /var/www is shared. Thanks :)
Yes, 16-branch. Thank you, super fast (-: