Repository navigation
Closed
Labels
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEPlatformRelates to OS, containers, platform-based utilities like FS, system based appsState-Modulebugbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
Description of Issue/Question
The pyenv.install_pyenv state uses the wrong signature when calling _check_and_install_python(), passing user in for the python arg. Since user defaults to None, this causes a fun-to-debug traceback when it later tries to run a regex search against python:
----------
ID: install-pyenv
Function: pyenv.install_pyenv
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1626, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1492, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/states/pyenv.py", line 215, in install_pyenv
return _check_and_install_python(ret, user)
File "/usr/lib/python2.7/dist-packages/salt/states/pyenv.py", line 84, in _check_and_install_python
if __salt__['pyenv.install_python'](python, runas=user):
File "/usr/lib/python2.7/dist-packages/salt/modules/pyenv.py", line 159, in install_python
python = re.sub(r'^python-', '', python)
File "/usr/lib/python2.7/re.py", line 151, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or buffer
Started: 12:14:18.916348
Duration: 2.586 ms
Changes:
Setup
This state will adequately demonstrate the bug:
pyenv-install:
pyenv.install_pyenv
Versions Report
$ salt --versions-report
Salt Version:
Salt: 2015.8.8
Dependency Versions:
Jinja2: 2.7.2
M2Crypto: Not Installed
Mako: Not Installed
PyYAML: 3.10
PyZMQ: 14.0.1
Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
RAET: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
cffi: 1.8.3
cherrypy: Not Installed
dateutil: 2.6.0
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
libgit2: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: 1.2.3
pycparser: 2.17
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: Not Installed
smmap: Not Installed
timelib: Not Installed
System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.13.0-30-generic
system: Ubuntu 14.04 trusty
We ran into the problem on a masterless VM.
/cc @ryanmrubin
Reacted by Ryan Rubin
Metadata
Metadata
Assignees
Labels
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEPlatformRelates to OS, containers, platform-based utilities like FS, system based appsState-Modulebugbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
Ch3LL commentedon Nov 11, 2016
Looks like i'm able to replicate this.
Here is a docker container for whoever wants to replicate this easily:
docker run -itv /home/ch3ll/git/salt/:/testing/ ch3ll/issues:37648 salt-call --local state.sls test(where /home/ch3ll/git/salt/ is a local git clone of salt)Looks like we need to get this fixed up. Thanks
Fixes saltstack#37648 and related bugs
stale commentedon Jul 24, 2018
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
arcaartem commentedon Mar 19, 2019
has this issue ever been resolved?
stale commentedon Mar 21, 2019
Thank you for updating this issue. It is no longer marked as stale.
13 remaining items
corywright commentedon May 5, 2026
This appears to still be broken.
Fix pyenv.install_pyenv passing user into the python argument (#69682)