Repository navigation
Closed
Labels
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEP2Priority 2PlatformRelates to OS, containers, platform-based utilities like FS, system based appsState-ModuleZRELEASED - Boronbugbroken, incorrect, or confusing behaviorseverity-criticaltop severity, seen by most users, serious issuesseverity-high2nd top severity, seen by most users, causes major problems
Milestone
Description
Description of Issue/Question
When passing in the version option into pkg.installed, the package will get installed, but the state will fail.
Setup
I've done this on both Arch linux and CentOS 5 with the same results.
CentOS 5 state:
/srv/salt/python-devel.sls
python-dev:
pkg.installed:
- name: python26-devel
- version: 0:2.6.8-3.el5Arch Linux state:
/srv/salt/nginx.sls
nginx-install:
pkg.installed:
- name: nginx
- version: 1.10.0Steps to Reproduce Issue
This can be run via `salt '*' state.sls nginx' or with salt-call
salt-call --local state.sls nginx
[INFO ] Determining pillar cache
[INFO ] Determining pillar cache
[INFO ] Loading fresh modules for state activity
[INFO ] Fetching file from saltenv 'base', ** done ** u'nginx.sls'
[INFO ] Executing command 'npm --version' in directory '/root'
[INFO ] Running state [nginx] at time 15:31:49.381700
[INFO ] Executing state pkg.installed for nginx
[INFO ] Executing command 'pacman -Q' in directory '/root'
[INFO ] Executing command 'pacman -S "--noprogressbar" "--noconfirm" "--needed" "-y" "nginx=1.10.0"' in directory '/root'
[INFO ] Executing command 'pacman -Q' in directory '/root'
[ERROR ] Made the following changes:
'nginx' changed from 'absent' to '1.10.0-2'
[INFO ] Loading fresh modules for state activity
[INFO ] Completed state [nginx] at time 15:31:53.835534
local:
----------
ID: nginx-install
Function: pkg.installed
Name: nginx
Result: False
Comment: The following packages failed to install/update: nginx=1.10.0
Started: 15:31:49.381700
Duration: 4453.834 ms
Changes:
----------
nginx:
----------
new:
1.10.0-2
old:
Summary for local
------------
Succeeded: 0 (changed=1)
Failed: 1
------------
Total states run: 1Versions Report
Cent OS 5
Salt Version:
Salt: 2015.8.8.2
Dependency Versions:
Jinja2: 2.5.5
M2Crypto: 0.21.1
Mako: Not Installed
PyYAML: 3.08
PyZMQ: 14.5.0
Python: 2.6.8 (unknown, Mar 15 2016, 21:23:59)
RAET: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
libgit2: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.5
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: Not Installed
smmap: Not Installed
timelib: Not Installed
System Versions:
dist: redhat 5.6 Final
machine: x86_64
release: 4.5.0-x86_64-linode65
system: CentOS 5.6 FinalArch
Salt Version:
Salt: 2015.8.8.2
Dependency Versions:
Jinja2: 2.8
M2Crypto: 0.24.0
Mako: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
Python: 2.7.11 (default, Mar 31 2016, 06:18:34)
RAET: 0.6.5
Tornado: 4.3
ZMQ: 4.1.4
cffi: 1.6.0
cherrypy: 3.8.0
dateutil: 2.4.2
gitdb: 0.6.4
gitpython: 1.0.1
ioflo: 1.5.0
libgit2: Not Installed
libnacl: 1.4.4
msgpack-pure: Not Installed
msgpack-python: 0.4.7
mysql-python: 1.2.5
pycparser: 2.14
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: 0.3.7
smmap: 0.9.0
timelib: 0.2.4
System Versions:
dist:
machine: x86_64
release: 4.1.3Reacted by Justin Findlay
Metadata
Metadata
Assignees
Labels
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEP2Priority 2PlatformRelates to OS, containers, platform-based utilities like FS, system based appsState-ModuleZRELEASED - Boronbugbroken, incorrect, or confusing behaviorseverity-criticaltop severity, seen by most users, serious issuesseverity-high2nd top severity, seen by most users, causes major problems
Activity
justinta commentedon May 5, 2016
@meggiebot This may be a blocker... I'd like to have someone else look at it.
2 remaining items
terminalmage commentedon May 10, 2016
I don't see how this is a bug. Presumably the nginx SLS file specifies a version of
1.10.0, but the installed version is1.10.0-2, which is not the same.terminalmage commentedon May 10, 2016
Seems like incorrectly-written SLS to me.
thatch45 commentedon May 10, 2016
I agree with @terminalmage, this state looks to be running correctly
Fix regression in 2016.3 HEAD when version is specified
terminalmage commentedon May 10, 2016
Fixed in #33146.
Fix regression in 2016.3 HEAD when version is specified (#33146)
terminalmage commentedon May 11, 2016
As a bit more background, since it wasn't described in the initial post, although this issue as reported was really just a matter of badly-formatted SLS, on subsequent state runs after the first one, the state would return
True, when it should have failed like it did the first time. This was fixed in #33146, which has been merged.[develop] Merge forward from 2016.3 to develop (#33193)