salt: win_dacl module stacktrace: NameError: name 'ntsecuritycon' is not defined
Description of Issue/Question
[ERROR ] Failed to import module win_dacl, this is due most likely to a syntax error:
Traceback (most recent call last):
File "/opt/salt/lib/python2.7/site-packages/salt/loader.py", line 1253, in _load_module
), fn_, fpath, desc)
File "/opt/salt/lib/python2.7/site-packages/salt/modules/win_dacl.py", line 39, in <module>
class daclConstants(object):
File "/opt/salt/lib/python2.7/site-packages/salt/modules/win_dacl.py", line 47, in daclConstants
FILE_ALL_ACCESS = (ntsecuritycon.STANDARD_RIGHTS_REQUIRED | ntsecuritycon.SYNCHRONIZE | 0x1ff)
NameError: name 'ntsecuritycon' is not defined
Steps to Reproduce Issue
running a salt-call state.highstate
Versions Report
[root@testn /opt/salt]# ./bin/salt-call --versions-report
Salt Version:
Salt: 2016.3.0rc1-96-gfe86a3d
Dependency Versions:
Jinja2: 2.8
M2Crypto: Not Installed
Mako: Not Installed
PyYAML: 3.11
PyZMQ: 14.4.1
Python: 2.7.11 (default, Mar 18 2016, 13:38:08)
RAET: 0.6.5
Tornado: 4.3
ZMQ: 4.1.3
cffi: Not Installed
cherrypy: 3.8.0
dateutil: 2.4.0
gitdb: 0.6.4
gitpython: 1.0.2
ioflo: 1.5.1
libgit2: Not Installed
libnacl: 1.4.4
msgpack-pure: Not Installed
msgpack-python: 0.4.7
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: 2.0.2
smmap: 0.9.0
timelib: 0.2.4
System Versions:
dist:
machine: i86pc
release: 5.11
system: SunOS
version: Not Installed
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 27 (4 by maintainers)
It’s absolutely unacceptable. We’re working on patched 2015.8.8 packages with the fix for this and fixes for a few other issues.
That is going to be painful for anyone running on non-windows. The logs will be full of mis-information which is not great. Consider maybe pushing a 2015.8.8.1 out for sanity sake? If not I’ll just fork it and apply the fix and move on with my own hosted repo… which is less desirable. May seems like a ways out to fix such an error.
@meggiebot Just upgraded to 2015.8.8.2 on this host from saltstack repo and issue is gone.
A patched version of 2015.8.8 that includes the fix for this issue is now available on repo.saltstack.com. https://docs.saltstack.com/en/latest/topics/releases/2015.8.8.html#salt-2015-8-8-2
Just a suggestion since issues like this have plagued a large number of releases recently, could you add a pre-release test that a plain
salt-call state.highstate -l warning >/dev/null
on a minion without any states doesn’t have anything written to stderr? Since errors are logged to stderr this will ensure there’s no warnings or higher severity logging messages just from importing modules.@ralphrodkey: well if you don’t have any windows minions, you can also disable the module completely!
Just add the following to your minion configuration:
seeing this in 2015.8.8 that was just installed from repo.saltstack.com.