Open bipt0 opened 3 years ago
Any update? Do you need more information?
@bipt0 Apologies for the delay on this one. Is this something you're seeing specifically on Windows or are you seeing this running the orchestration states on other operating systems as well?
This is specifically on windows because of the vs_BuildTools.exe
installer.
Recently we had something... maybe... related come up where the issue is
salt win_patch do.thing args
and
salt-call do.thing args
are treating the arguments differently, i.e. not wrapping a string correctly and it being passed as an int. Wonder if this is related. But thanks for the information! Definitely will be taking a look at this this week.
Do you have any update on this?
I do not have any updates on this yet... let me get back before tomorrow (20/07/2021) end of day.
hey @yukpun so i have the following setup:
salt-master on ub20 (running v3002.2) salt-minion on win10 (running v3003.1)
and here's my orch state:
do thing:
salt.state:
- sls: test-file
- tgt: "win_box"
do thing again:
salt.state:
- sls: test-file
- tgt: "win_box"
and the state file:
log first:
module.run:
- name: log.info
- message: Starting first
install:
cmd.run:
- name: Start-Process -Wait -FilePath "C:\test\build_tools.exe" -ArgumentList "--passive"
- shell: powershell
and executed with : salt-run state.orch orch.test-orch -l debug
and it came back successful:
joe-VirtualBox_master:
----------
ID: do thing
Function: salt.state
Result: True
Comment: States ran successfully. Updating win_box.
Started: 13:50:34.716472
Duration: 6899.572 ms
Changes:
win_box:
----------
ID: install
Function: cmd.run
Name: Start-Process -Wait -FilePath "C:\test\build_tools.exe" -ArgumentList "--passive"
Result: True
Comment: Command "Start-Process -Wait -FilePath "C:\test\build_tools.exe" -ArgumentList "--passive"" run
Started: 13:50:36.909079
Duration: 4444.906 ms
Changes:
----------
pid:
23448
retcode:
0
stderr:
stdout:
Summary for win_box
------------
Succeeded: 1 (changed=1)
Failed: 0
------------
Total states run: 1
Total run time: 4.445 s
Summary for joe-VirtualBox_master
------------
Succeeded: 1 (changed=1)
Failed: 0
------------
Total states run: 1
Total run time: 6.900 s
[INFO ] Runner completed: 20210721195034022717
[DEBUG ] Closing IPCMessageClient instance
could you let me know the differences here? im also using a very similar .exe and the installer launches on my minion
Hi @xeacott
Here is .sls file
install_cortex:
pkg.installed:
- name: cortex
And here is winrepo .sls file
# both 32-bit (x86) AND a 64-bit (AMD64) installer available
{% set version = '73120981' %}
{% set source_path = 'http://internal-server/winrepo/pan-traps' %}
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
Case 1
salt node-id state.sls cortex
When run this command, salt returns error, hovewer package installs. You can check error log here
Case 2
salt node-id pkg.install cortex
When run this command, everything installs fine.
I'm experiencing exactly the same issue as @yukpun.
Salt Version: Salt: 3005.1
Using state.apply I get:
TAS-MD:
----------
ID: install-openlogic-openjdk-jre
Function: pkg.installed
Name: openlogic-openjdk-jre
Result: False
Comment: The following packages failed to install/update: openlogic-openjdk-jre
Started: 00:09:33.955229
Duration: 2159.221 ms
Changes:
----------
openlogic-openjdk-jre:
----------
install status:
success
Summary for TAS-MD
------------
Succeeded: 0 (changed=1)
Failed: 1
------------
Total states run: 1
Total run time: 2.159 s
Using pkg.install:
[DEBUG ] return event: {'TAS-MD': {'ret': {'openlogic-openjdk-jre': {'install status': 'success'}}, 'retcode': 0, 'jid': '20221027031718249050'}}
[DEBUG ] The functions from module 'nested' are being loaded by dir() on the loaded module
[DEBUG ] LazyLoaded nested.output
TAS-MD:
----------
openlogic-openjdk-jre:
----------
install status:
success
/srv/salt/win/repo-ng/openlogic-openjdk-jre.sls:
openlogic-openjdk-jre:
'8u292-b10-windows-x32':
full_name: 'OpenLogic OpenJDK JRE 8u292 (32 bit)'
installer: salt://win/repo-ng/openlogic-openjdk-jre-8u292-b10-windows-x32.msi
install_flags: 'ADDLOCAL="FeatureEnvironment,FeatureMain,FeatureJarFileRunWith,FeatureJavaHome" /qn /norestart'
uninstall_flags: '/qn /norestart'
msiexec: True
locale: en_US
reboot: False
Description Minion logs return
'success': True,
but orchestrate returns failure. Also a related issue wherestate.apply
is successful whilestate.orch
fails.Minion logs:
Master output:
Setup 3 files: scratch.sls, first.sls, vs_BuildTools.exe Clean VM running Windows 2019
salt://orch/scratch:
salt://states/scratch/first:
vs_BuildTools.exe from here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
Steps to Reproduce the behavior This works :heavy_check_mark::
salt -t 60 'salt-minion-new' state.apply states.scratch.first -l debug
This fails :x::salt-run -t 60 state.orch orch.scratch -l debug
Expected behavior
salt-run state.orch orch.scratch
should succeedScreenshots![image](https://user-images.githubusercontent.com/72946873/96193172-77d61b80-0efc-11eb-96f8-916feed1845b.png)
Versions Report
salt --versions-report on master
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ``` Salt Version: Salt: 3001.1 Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: 2.6.1 docker-py: Not Installed gitdb: 2.0.3 gitpython: 2.1.8 Jinja2: 2.10 libgit2: 0.26.0 M2Crypto: Not Installed Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.5.6 mysql-python: Not Installed pycparser: Not Installed pycrypto: 2.6.1 pycryptodome: 3.4.7 pygit2: 0.26.2 Python: 3.6.9 (default, Jul 17 2020, 12:50:27) 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.4.0-1031-azure system: Linux version: Ubuntu 18.04 Bionic Beaver ```Minion:
Salt-Minion-3001.1-Py3-AMD64-Setup.exe