salt: pkg.installed succeeded but says it failed
python-pip has been installed after the execution of this state:
salt-ssh minion state.sls my_sls
minion:
----------
ID: necessary_packages
Function: pkg.installed
Result: False
Comment: The following packages failed to install/update: python-pip=7.1.2 42 targeted packages were already installed
Started: 12:36:58.350875
Duration: 12753.843 ms
Changes:
----------
python-pip:
----------
new:
7.1.2-1.0
old:
...
Finally running salt-ssh-2015.8.0 and salt-2015.8.0 installed via pip.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 36 (18 by maintainers)
This is not a bug, this is expected behavior. Salt does not support using aliased package names, for the reasons described in this comment.
You will need to use the actual package name. For CentOS, that is
vim-enhanced
.@adamehirsch The reason you are seeing that is because the package is a 32-bit package on a 64-bit OS, and Salt adds
.arch
(e.g..i686
) to the package name so that there are no collisions with potential 64-bit versions of the same package. This is what allows one to have the 64 and 32-bit versions of the same package installed, provided they do not conflict with one another. You would need to usefish.i686
in your example.had the same issue, put a workaround in place by making the package name and version an exact match to the
changes
output.In my case, changes output was:
I updated the state to:
@theunsa , I’m experiencing the same issue on the 2017.2 branch. One workaround that did the trick for me was to do e.g.
instead of
All,
I just ran into this issue and found something interesting.
Notice, that the package that I was trying to install was
python-pip
. In CentOS, that is referred to aspython2-pip
. Because it went ahead and found that out for me, it still installed…but Salt was looking forpython-pip
, and therefore marked it as a failure.Once I changed my state to
python2-pip
, the EXACT name that is coming from the package management software, things went green:Is there an update for a possible fix of this issue? We keep running into it over and over again.
I’m running into the same thing with a specific piece of software I’m trying to install.
Assume the package is called
michaelsoft-1.2.3-45.el7.x86_64
.If I try the following snippet, salt returns a message that the packages failed to install or update. Contrary to the salt output, the packages DO get installed.
Salt shows the correct output strictly because I put the
-45.el7
portion of the package name on. The packages are installed just as above.It would be useful to have a flag such as
ignore_release: True
much likeignore_epoch: True
that would allow someone to ignore-45.el7
or other release information.Same here, error using the most basic example, installing vim to a Centos 7 minion:
On minion side:
Package 2:vim-enhanced-7.4.160-1.el7.x86_64 already installed and latest version