We have a custom repo-ng state that installs a custom package. The install status reports success but salt-minion considers it a failure claiming the package could not be installed/updated.
[ERROR] {u'Zabbix Agent': {u'new': u'3.4.10.0', u'old': u''}, u'zabbix-agent': {u'install status': u'success'}}
local:
----------
ID: zabbix-agent
Function: pkg.installed
Result: False
Comment: The following packages failed to install/update: zabbix-agent
Started: 09:19:29.146000
Duration: 1360.0 ms
Changes:
----------
Zabbix Agent:
----------
new:
3.4.10.0
old:
zabbix-agent:
----------
install status:
success
zabbix-agent:
pkg.installed:
- name: zabbix-agent
The winrepo entry:
zabbix-agent:
latest:
full_name: 'Zabbix-Agent'
installer: 'http://www.suiviperf.com/zabbix/zabbix_agent-3.4.10_x64.msi'
install_flags: 'SERVER=127.0.0.1 SERVERACTIVE=127.0.0.1 /qn'
uninstaller: 'msiexec.exe'
uninstall_flags: '/qn /x {EA5378EF-F39A-4711-BB65-728AB954293A} /norestart'
msiexec: True
reboot: False
The logs also state this, which is probably related since the code checks for retcode:
[DEBUG ] Passing on saltutil error. Key 'u'retcode' missing from client return. This may be an error in the client.
See above
Minion
Salt Version:
Salt: 2018.3.2
Dependency Versions:
cffi: 1.10.0
cherrypy: 10.2.1
dateutil: 2.6.1
docker-py: Not Installed
gitdb: 2.0.3
gitpython: 2.1.3
ioflo: Not Installed
Jinja2: 2.9.6
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.6
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: 2.17
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)]
python-gnupg: 0.4.1
PyYAML: 3.12
PyZMQ: 16.0.3
RAET: Not Installed
smmap: 2.0.3
timelib: 0.2.4
Tornado: 4.5.1
ZMQ: 4.1.6
System Versions:
dist:
locale: cp1252
machine: AMD64
release: 2016Server
system: Windows
version: 2016Server 10.0.14393 Multiprocessor Free
Master
Salt Version:
Salt: 2018.3.2
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.1
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: 1.6.1
M2Crypto: Not Installed
Mako: 1.0.3
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: 1.3.7
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.12 (default, Dec 4 2017, 14:50:18)
python-gnupg: 0.3.8
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: 0.9.0
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
locale: UTF-8
machine: x86_64
release: 4.4.0-87-generic
system: Linux
version: Ubuntu 16.04 xenial
@twangboy @damon-atkins @dwoz can one of yall look at this? I am not familiar enough with the windows package module stuff to see why it would think it is failing.
Thanks!
Daniel
full_name: 'Zabbix-Agent'
I've checked the installer, and it records its name as 'Zabbix Agent'.
I think you just need to remove the hyphen.
For details of your software after its installed, run the following on the minion. For further info see https://docs.saltstack.com/en/develop/topics/releases/2018.3.0.html#new-utils-module-salt-utils-pkg-win
chcp 65001
c:\salt\bin\python.exe c:\salt\bin\lib\site-packages\salt\utils\pkg\win.py
c:\salt\bin\python.exe c:\salt\bin\lib\site-packages\salt\utils\pkg\win.py detail system
Pls change the title to
win_pkg: pkg.installed on Windows shows failed when it succeeded
@Ch3LL Can we have a new label called Resolved Use Issue i.e. something to indicate the person needed help using salt and their problem was resolved and was not a bug. Might help point to where doco needs improving.
@morganwillcock So the full_name must match the name in the installer? I'll give this a shot on Monday when I'm back in the office.
@syphernl it is the DisplayName that is stored in the Uninstall registry key, but it did also print it out for you when the installation appeared:
Changes:
----------
Zabbix Agent: <-- DisplayName for installation
----------
new:
3.4.10.0
old:
zabbix-agent:
----------
install status:
success
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall /s /v DisplayName | find "Zabbix"
DisplayName REG_SZ Zabbix Agent
@morganwillcock Removing the hyphen resolved the issue! Thanks!
Most helpful comment
I've checked the installer, and it records its name as 'Zabbix Agent'.
I think you just need to remove the hyphen.