Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

virtualenv.managed do not work when runas www-data #4171

Closed
yml opened this Issue Mar 20, 2013 · 1 comment

Comments

Projects
None yet
3 participants
Contributor

yml commented Mar 20, 2013

Interesting enough continuing to fix the collateral damages cause by the upgrade to 0.13.3-1 I found out that virtualenv state is also broken if used in conjunction with runas:

$ sudo -E salt-call state.single virtualenv.managed /srv/virtualenvs/foo runas=www-data
[INFO    ] Loaded configuration file: /etc/salt/minion
[INFO    ] Executing command 'ps -efH' in directory '/home/ubuntu'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Executing state virtualenv.managed for /srv/virtualenvs/foo
[ERROR   ] No changes made for /srv/virtualenvs/foo
local:
----------
    State: - virtualenv
    Name:      /srv/virtualenvs/foo
    Function:  managed
        Result:    False
        Comment:   An exception occured in this state: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1205, in call
    ret = self.states[cdata['full']](*cdata['args'])
  File "/usr/lib/python2.7/dist-packages/salt/states/virtualenv.py", line 111, in managed
    runas=runas)
  File "/usr/lib/python2.7/dist-packages/salt/modules/virtualenv.py", line 77, in create
    return __salt__['cmd.run_all'](cmd, runas=runas)
  File "/usr/lib/python2.7/dist-packages/salt/modules/cmdmod.py", line 389, in run_all
    template=template, rstrip=rstrip, umask=umask)
  File "/usr/lib/python2.7/dist-packages/salt/modules/cmdmod.py", line 214, in _run
    raise CommandExecutionError(msg)Interesting enough continuing to fix the collateral damages cause by the upgrade to 0.13.3-1 I found out that virtualenv  state is also broken if used in conjunction with `runas`: 

A work around is to run this code with group: www-data instead of runas: www-data

This issue is very similar to this #4168

@ghost ghost assigned seanchannel Mar 20, 2013

Owner

thatch45 commented Mar 20, 2013

I am going to close this as a duplicate of #4168

@thatch45 thatch45 closed this Mar 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment