wunki / django-salted

Full stack SaltStack configuration for Django with the help of Vagrant.
BSD 3-Clause "New" or "Revised" License
319 stars 42 forks source link

vagrant 1.2.4, vagrant-salt 0.4.0, VirtualBox 4.2.16 -- initial install doesn't work #5

Closed csauer-djed closed 11 years ago

csauer-djed commented 11 years ago

I installed the versions above, cloned the repo, and ran vagrant up. I got the "501 Bad Gateway", even after waiting a bit. The log from the install showed the contents:

----------
    State: - virtualenv
    Name:      /home/vagrant/env
    Function:  managed
        Result:    False
        Comment:   An exception occurred in this state: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/salt/state.py", line 1243, in call
    ret = self.states[cdata['full']](*cdata['args'])
  File "/usr/lib/pymodules/python2.7/salt/states/virtualenv_mod.py", line 126, in managed
    runas=runas
  File "/usr/lib/pymodules/python2.7/salt/modules/virtualenv_mod.py", line 126, in create
    virtualenv.__version__.split('rc')[0].split('.')]
AttributeError: 'module' object has no attribute '__version__'

        Changes:   
----------

you get the same error if you "vagrant ssh" and then run "sudo salt-call state.highstate"

/home/vagrant does not contain a /env/ directory for venv which causes uwsgi to keep trying to start and fail.

once logged into the VM, I created the venv by hand and ran the pip commands on it and uwsgi seemed to be happy but still wasn't getting the expected results (but I think we need to worry about one step at a time)

csauer-djed commented 11 years ago

I'm assuming it's an issue with either vagrant or vagrant-salt, but I don't know what I don't know in this case.

csauer-djed commented 11 years ago

I re-did the creation of the venv by hand and made sure to follow the salt scripts to the letter and I was able to get the example page served up properly.

So the only issue why vagrant/vagrant-salt/salt could not auto-create the venv.

wunki commented 11 years ago

I found one thing which could be causing this, but I can't know for sure. If you want to help me debug it, you should set salt.run_highstate to false in the Vagrantfile and then manually run the following after clean vagrant up:

sudo salt-call state.highstate

If you get an error in your output, let me know. For now, I will close this issue.

csauer-djed commented 11 years ago

It's actually an issue with Salt and has been fixed for the next release.

https://github.com/saltstack/salt/issues/6309