defaults not working for pecl.installed state or module
The defaults option for the pecl.installed state and module appears to do nothing. Installing a pecl package that requires input just hangs.
Here's the relevant debug output (includes the sls file):
[INFO ] Fetching file from saltenv 'base', ** done ** 'lamp/packages.sls'
[DEBUG ] compile template: /var/cache/salt/minion/files/base/lamp/packages.sls
[DEBUG ] Jinja search path: ['/var/cache/salt/minion/files/base']
[PROFILE ] Time (in seconds) to render '/var/cache/salt/minion/files/base/lamp/packages.sls' using 'jinja' renderer: 0.00360703468323
[DEBUG ] Rendered data from file: /var/cache/salt/minion/files/base/lamp/packages.sls:
install_lamp_packages:
pkg.installed:
- pkgs:
- httpd
- php-pdo
- php-common
- php-mysql
- php-xml
- php-pear
- php-cli
- php
- php-ldap
- php-process
- php-devel
install_APC:
pecl.installed:
- name: APC
- defaults: "n"
- requires:
- pkg: php-pear
[DEBUG ] LazyLoaded config.get
[DEBUG ] Results of YAML rendering:
OrderedDict([('install_lamp_packages', OrderedDict([('pkg.installed', [OrderedDict([('pkgs', ['httpd', 'php-pdo', 'php-common', 'php-mysql', 'php-xml', 'php-pear', 'php-cli', 'php', 'php-ldap', 'php-process', 'php-devel'])])])])), ('install_APC', OrderedDict([('pecl.installed', [OrderedDict([('name', 'APC')]), OrderedDict([('defaults', 'n')]), OrderedDict([('requires', [OrderedDict([('pkg', 'php-pear')])])])])]))])
[PROFILE ] Time (in seconds) to render '/var/cache/salt/minion/files/base/lamp/packages.sls' using 'yaml' renderer: 0.00774884223938
[DEBUG ] LazyLoaded pkg.install
[DEBUG ] LazyLoaded pkg.installed
[DEBUG ] Could not LazyLoad pkg.ex_mod_init: 'pkg.ex_mod_init' is not available.
[INFO ] Running state [install_lamp_packages] at time 09:57:08.471257
[INFO ] Executing state pkg.installed for install_lamp_packages
[INFO ] Executing command ['rpm', '-qa', '--queryformat', '%{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-(none)\n'] in directory '/root'
[INFO ] All specified packages are already installed
[INFO ] Completed state [install_lamp_packages] at time 09:57:09.226363 duration_in_ms=755.106
[DEBUG ] LazyLoaded pecl.installed
[INFO ] Running state [APC] at time 09:57:09.227140
[INFO ] Executing state pecl.installed for APC
[INFO ] Executing command 'pecl list' in directory '/root'
[DEBUG ] stdout: (no packages installed from channel pecl.php.net)
[INFO ] Executing command 'pecl -d preferred_state=stable install APC' in directory '/root'
Installing APC using pecl requires a 'y' or 'n' to a few questions in order to continue. Running the install using pecl.install just hangs. Tried several variations for defaults, i.e. n, 'n', & "n". Running the pecl.install module exhibited the same behavior.
Versions: Salt Version: Salt: 2016.11.0
Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: Not Installed gitdb: Not Installed gitpython: Not Installed ioflo: Not Installed Jinja2: 2.7.2 libgit2: Not Installed libnacl: Not Installed M2Crypto: Not Installed Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.4.6 mysql-python: Not Installed pycparser: Not Installed pycrypto: 2.6.1 pygit2: Not Installed Python: 2.7.5 (default, Sep 15 2016, 22:37:39) python-gnupg: Not Installed PyYAML: 3.11 PyZMQ: 15.3.0 RAET: Not Installed smmap: Not Installed timelib: Not Installed Tornado: 4.2.1 ZMQ: 4.1.4
System Versions: dist: centos 7.2.1511 Core machine: x86_64 release: 3.10.0-327.36.3.el7.x86_64 system: Linux version: CentOS Linux 7.2.1511 Core
@jmcook1 looks like i'm able to replicate this. We will need to get this fixed thanks.
Here is a docker container for someone to quickly replicate the issue:
docker run -it -v /home/ch3ll/git/salt/:/testing/ ch3ll/issues:38126 salt-call --local state.sls test -ldebug(where /home/ch3ll/git/salt is a local cloned git repo)
This bug still exists in 2018.3.0. Any updates? I'm using this as a work around:
install_apc:
cmd.run:
- name: yes 'n'| pecl -d preferred_state=stable install APC
- unless: test -f /usr/lib64/php/modules/apc.so
Salt version info:
Salt Version:
Salt: 2018.3.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.1
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.5 (default, Apr 11 2018, 07:36:10)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: centos 7.4.1708 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-862.el7.x86_64
system: Linux
version: CentOS Linux 7.4.1708 Core
no one is currently working on this due to other higher priority issues. please feel free to push a PR for this issue if you can spare the time :)
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.
not stale!