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
When applying Microsoft Windows policies with lgpo.set sometimes a KeyError will occur.
Ex:
[ERROR ] An exception occurred in this state: Traceback (most recent call last):
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\state.py", line 2154, in call
*cdata["args"], **cdata["kwargs"]
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\loader.py", line 2106, in wrapper
return f(*args, **kwargs)
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\states\win_lgpo.py", line 410, in set_
return_value_only=True,
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\modules\win_lgpo.py", line 9463, in get_policy
hierarchical_return=hierarchical_return,
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\modules\win_lgpo.py", line 9282, in _get_policy_adm_setting
for path_needed in unpathed_dict[policy_namespace]:
KeyError: 'Microsoft.Policies.UEV'
See below for the example state which caused this error.
C:\Windows\system32>salt-call --local state.sls Calculator test=True
[ERROR ] An exception occurred in this state: Traceback (most recent call last):
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\state.py", line 2154, in call
*cdata["args"], **cdata["kwargs"]
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\loader.py", line 2106, in wrapper
return f(*args, **kwargs)
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\states\win_lgpo.py", line 410, in set_
return_value_only=True,
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\modules\win_lgpo.py", line 9463, in get_policy
hierarchical_return=hierarchical_return,
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\modules\win_lgpo.py", line 9282, in _get_policy_adm_setting
for path_needed in unpathed_dict[policy_namespace]:
KeyError: 'Microsoft.Policies.UEV'
local:
----------
ID: Calculator
Function: lgpo.set
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\state.py", line 2154, in call
*cdata["args"], **cdata["kwargs"]
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\loader.py", line 2106, in wrapper
return f(*args, **kwargs)
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\states\win_lgpo.py", line 410, in set_
return_value_only=True,
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\modules\win_lgpo.py", line 9463, in get_policy
hierarchical_return=hierarchical_return,
File "c:\salt\bin\lib\site-packages\salt-3002.7-py3.7.egg\salt\modules\win_lgpo.py", line 9282, in _get_policy_adm_setting
for path_needed in unpathed_dict[policy_namespace]:
KeyError: 'Microsoft.Policies.UEV'
Started: 01:24:56.454565
Duration: 968.75 ms
Changes:
Summary for local
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Total run time: 968.750 ms
Versions Report
C:\Windows\system32>salt-call --versions-report
Salt Version:
Salt: 3002.7
Dependency Versions:
cffi: 1.12.2
cherrypy: 17.4.1
dateutil: 2.8.0
docker-py: Not Installed
gitdb: 2.0.5
gitpython: 2.1.10
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: Not Installed
Mako: 1.0.7
msgpack: 1.0.0
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.19
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
Python: 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
python-gnupg: 0.4.4
PyYAML: 5.3.1
PyZMQ: 18.0.1
smmap: 2.0.5
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist:
locale: cp1252
machine: AMD64
release: 10
system: Windows
version: 10 10.0.19041 SP0
The text was updated successfully, but these errors were encountered:
Description
When applying Microsoft Windows policies with
lgpo.set
sometimes aKeyError
will occur.Ex:
See below for the example state which caused this error.
Setup
Install salt-minion on a Windows box
Example state:
Calculator.sls
Steps to Reproduce the behavior
Versions Report
The text was updated successfully, but these errors were encountered: