[BUG] salt return exitcode1 with pkg.installed on Windows, but App is installed
Open
@xeacott is already working on this.
Since May 27, 2021.
bug
severity-low
Windows
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
I'm Trying to install Antivirus softwate on salt minion (Windows 10) Cortex, usign salt-call.bat
Setup
{% set version = '73120981' %}
{% set source_path = 'INTERNAL_COMPANY_URL' %}
cortex:
'{{version}}':
{% if grains['cpuarch'] == 'AMD64' %}
installer: '{{source_path}}/WindowsAgent{{version|replace(".", "_")}}_x64.msi'
uninstaller: '{{source_path}}/WindowsAgent{{version|replace(".", "_")}}_x64.msi'
arch: x64
{% else %}
installer: '{{source_path}}/WindowsAgent{{version|replace(".", "_")}}_x86.msi'
uninstaller: '{{source_path}}/WindowsAgent{{version|replace(".", "_")}}_x86.msi'
arch: x86
{% endif %}
full_name: 'Cortex {{version}}'
install_flags: '/qn /norestart'
uninstall_flags: '/qn /norestart'
msiexec: True
locale: en_US
reboot: False
Below state calls with this state:
install_cortex:
pkg.installed:
- name: cortex
Steps to Reproduce the behavior
I tried install it on clean Windows 10 with CMD
C:\salt>salt-call.bat state.sls cortex
[ERROR ] {'cortex': {'install status': 'success'}, 'Cortex XDR 7.3.1.20981': {'old': '', 'new': '7.3.1.20981'}}
local:
----------
ID: install_cortex
Function: pkg.installed
Name: cortex
Result: False
Comment: The following packages failed to install/update: cortex
Started: 20:07:05.612151
Duration: 109018.207 ms
Changes:
----------
Cortex XDR 7.3.1.20981:
----------
new:
7.3.1.20981
old:
cortex:
----------
install status:
success
Summary for local
------------
Succeeded: 0 (changed=1)
Failed: 1
------------
Total states run: 1
Total run time: 109.018 s
Expected behavior
I expect no ERROR message here, since antivirus application installs and works fine after this
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3003
Dependency Versions:
cffi: 1.12.3
cherrypy: unknown
dateutil: 2.6.1
docker-py: 3.7.3
gitdb: 2.0.3
gitpython: 2.1.8
Jinja2: 2.10
libgit2: 1.1.0
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 0.5.6
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: 3.4.7
pygit2: 1.5.0
Python: 3.6.9 (default, Jan 26 2021, 15:33:00)
python-gnupg: 0.4.1
PyYAML: 3.12
PyZMQ: 17.1.2
smmap: 2.0.3
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.2.5
System Versions:
dist: ubuntu 18.04 Bionic Beaver
locale: UTF-8
machine: x86_64
release: 5.0.0-27-generic
system: Linux
version: Ubuntu 18.04 Bionic Beaver
Additional context
Weird thing - I tried to run salt state from master using salt pkg.install - and it was executed without errors.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.