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
The lgpo.set state fails on first run if the policy directory is missing. It attempts to create the directory, but fails setting permissions to the directory. On the 2nd run, the directory is present, so the state continues.
The directory that may be missing on a brand new machine:
C:\Windows\System32\GroupPolicy\User
Remove the above directory and run this command to trigger the issue.
salt '*' lgpo.set_user_policy "Control Panel\Display\Disable the Display Control Panel" Enabled
Observe following stacktrace is shown:
Traceback (most recent call last):
File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\state.py", line 2381, in call
ret = self.states[cdata["full"]](
File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\loader\lazy.py", line 159, 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 1245, 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 1260, in _run_as
return _func_or_method(*args, **kwargs)
File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\loader\lazy.py", line 1293, in wrapper
return f(*args, **kwargs)
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\states\win_lgpo.py", line 545, in set_
ret = __salt_["lgpo.set"](
File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\loader\lazy.py", line 159, 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 1245, 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 1260, in _run_as
return _func_or_method(*args, **kwargs)
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\modules\win_lgpo.py", line 10490, in set_
_ret = _writeAdminTemplateRegPolFile(
File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\modules\win_lgpo.py", line 8139, in _writeAdminTemplateRegPolFile
write_reg_pol_data(
File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\utils\win_lgpo_reg.py", line 141, in write_reg_pol_data
salt.modules.win_file.makedirs_(policy_file_path)
File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\modules\win_file.py", line 1730, in makedirs_
mkdir(
File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\modules\win_file.py", line 1600, in mkdir
_utils_["dacl.set_perms"](
NameError: name '_utils_' is not defined
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Description
The
lgpo.set
state fails on first run if the policy directory is missing. It attempts to create the directory, but fails setting permissions to the directory. On the 2nd run, the directory is present, so the state continues.The directory that may be missing on a brand new machine:
Remove the above directory and run this command to trigger the issue.
Observe following stacktrace is shown:
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)3006.3
Additional context
https://jira.eng.vmware.com/browse/VRAE-55875
The text was updated successfully, but these errors were encountered: