salt-ssh fails to call pkg.installed even on installed packages after updating to app-admin/salt-2018.3.0: ID: iptables-package Function: pkg.installed Name: net-firewall/iptables Result: False Comment: The following packages failed to install/update: net-firewall/iptables Started: 18:05:53.483064 Duration: 11688.891 ms Changes: app-admin/salt-2017.7.5 has no issue with same config
It is because of this change: https://github.com/saltstack/salt/commit/ba7d00f58ef10dd441dbc90ea1d92f28eb92d7d1 And they are trying to solve it in this PR : https://github.com/saltstack/salt/pull/43345 But they state they need help from "upstream", being "us" Anyone feel to help them with this.
This bug looks to have been fixed in the newly released salt-2018.3.1.
(In reply to Josh G from comment #2) > This bug looks to have been fixed in the newly released salt-2018.3.1. Aah maybe not. :/
pkg.installed seems to work in 2018.3.3 for me!
Portage support is still broken for me in Salt 2018.3.3: ID: net-analyzer/zabbix Function: pkg.installed Result: False Comment: An exception occurred in this state: Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/salt/state.py", line 1913, in call **cdata['kwargs']) File "/usr/lib64/python3.6/site-packages/salt/loader.py", line 1898, in wrapper return f(*args, **kwargs) File "/usr/lib64/python3.6/site-packages/salt/states/pkg.py", line 1548, in installed **kwargs) File "/usr/lib64/python3.6/site-packages/salt/states/pkg.py", line 521, in _find_install_targets cur_pkgs = __salt__['pkg.list_pkgs'](versions_as_list=True, **kwargs) File "/usr/lib64/python3.6/site-packages/salt/modules/ebuild.py", line 426, in list_pkgs pkgs = _vartree().dbapi.cpv_all() File "/usr/lib64/python3.6/site-packages/salt/modules/ebuild.py", line 68, in _vartree portage = reload(portage) NameError: name 'reload' is not defined Started: 13:07:08.194100 Duration: 3202.91 ms Changes:
@Karl-Johan Karisson My pull request for that error has just been merged and will soon be uppatched in newer versions
@Karl-Johan Karisson My pull request for that error has just been merged and will soon be uppatched in newer versions https://github.com/saltstack/salt/pull/50128
@Mark Gomersbach I use python3.6 and salt-2018.3.3 with the following state defintion: PKG__install__eix: pkg.latest: - name: app-portage/eix - cache_valid_time: 3600 Initially I encountered the same stacktrace as outlined in comment#5. However after applying Marks patch manually, I got a different stack trace. ID: PKG__install__eix Function: pkg.latest Name: app-portage/eix Result: False Comment: An exception occurred in this state: Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/salt/state.py", line 1913, in call **cdata['kwargs']) File "/usr/lib64/python3.6/site-packages/salt/loader.py", line 1898, in wrapper return f(*args, **kwargs) File "/usr/lib64/python3.6/site-packages/salt/states/pkg.py", line 2452, in latest and __salt__['portage_config.is_changed_uses'](pkg): File "/usr/lib64/python3.6/site-packages/salt/modules/portage_config.py", line 742, in is_changed_uses cpv = _get_cpv(cp) File "/usr/lib64/python3.6/site-packages/salt/modules/portage_config.py", line 132, in _get_cpv return _get_portage().db[portage.root]['vartree'].dep_bestmatch(cp) File "/usr/lib64/python3.6/site-packages/salt/modules/portage_config.py", line 60, in _get_portage return reload(portage) NameError: name 'reload' is not defined Looking into /usr/lib64/python3.6/site-packages/salt/modules/portage_config.py I found another occurance of reload in function '_get_portage()', around line 60. Adding the conditional import from Marks pull request at line 20 of 'portage_config.py' resolves the "new" stacktrace.
Created attachment 554958 [details] Fix reload(portage) issue I was able to fix the issue using user patches (see https://wiki.gentoo.org/wiki//etc/portage/patches) by dropping attachmet 'python3-reload-fix.patch' into folder '/etc/portage/patches/app-admin/salt-2018.3.3' and rebuilding salt using 'emerge -av =app-admin/salt-2018.3.3' If 'emerge' displays * User patches applied. during the build process applying the patch succeeded
fixed in latest version of app-admin/salt