You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
In 3007.0 and newer, modules/win_pkg.py is missing the function pkg.list_repo_pkgs which is required when running with test=True.
This is related to the introduction of the feature in #63986.
Setup (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Master or masterless minion needs to be set-up for Winrepo (winrepo.update_git_repos has been called).
Please be as specific as possible and give set-up details.
on-prem machine
VM (Virtualbox, KVM, etc. please specify)
VM running on a cloud service, please be explicit and add details
container (Kubernetes, Docker, containerd, etc. please specify)
or a combination, please be explicit
jails if it is FreeBSD
classic packaging
onedir packaging
used bootstrap to install
Steps to Reproduce the behavior
(Include debug logs if possible and relevant)
Examples:
salt <minion> state.single pkg.installed putty test=True
[ERROR ] An exception occurred in this state: Traceback (most recent call last):
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\state.py", line 2428, in call
ret = self.states[cdata["full"]](
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\loader\lazy.py", line 160, in __call__
ret = self.loader.run(run_func, *args, **kwargs)
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\loader\lazy.py", line 1269, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\loader\lazy.py", line 1284, in _run_as
return _func_or_method(*args, **kwargs)
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\loader\lazy.py", line 1317, in wrapper
return f(*args, **kwargs)
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\states\pkg.py", line 2815, in latest
changes = _get_installable_versions(targets, cur)
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\states\pkg.py", line 1033, in _get_installable_versions
explicit_versions = __salt__["pkg.list_repo_pkgs"](*explicit_targets)
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\loader\context.py", line 86, in __getitem__
return self.value()[item]
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\loader\lazy.py", line 384, in __getitem__
_ = super().__getitem__(item) # try to get the item from the dictionary
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\utils\lazy.py", line 104, in __getitem__
raise KeyError(key)
KeyError: 'pkg.list_repo_pkgs'
Expected behavior
No raised exception and result of the test state application to be displayed.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
Salt: 3007.1Python Version:
Python: 3.10.14 (heads/main:c1ec015, Apr 3 2024, 21:36:37) [MSC v.1938 64 bit (AMD64)]Dependency Versions:
cffi: 1.16.0cherrypy: 18.8.0dateutil: 2.8.2docker-py: Not Installedgitdb: 4.0.10gitpython: 3.1.43Jinja2: 3.1.4libgit2: Not Installedlooseversion: 1.3.0M2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.7msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 23.1pycparser: 2.21pycrypto: Not Installedpycryptodome: 3.19.1pygit2: Not Installedpython-gnupg: 0.5.2PyYAML: 6.0.1PyZMQ: 25.1.2relenv: 0.16.0smmap: 5.0.1timelib: 0.3.0Tornado: 6.3.3ZMQ: 4.3.4Salt Package Information:
Package Type: onedirSystem Versions:
dist:
locale: utf-8machine: AMD64release: 10system: Windowsversion: 10 10.0.26100 SP0 Multiprocessor Free
Description
In 3007.0 and newer,
modules/win_pkg.py
is missing the functionpkg.list_repo_pkgs
which is required when running withtest=True
.This is related to the introduction of the feature in #63986.
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Master or masterless minion needs to be set-up for Winrepo (
winrepo.update_git_repos
has been called).Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior
(Include debug logs if possible and relevant)
Examples:
or
results in:
Expected behavior
No raised exception and result of the test state application to be displayed.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Ref. @twangboy
The text was updated successfully, but these errors were encountered: