saltstack/salt — pull request #9609 by thematthopkins (2014-01-07 15:55:32+00:00)
Title: fix for windows masterless read-only highstate.cache.p file

After the first highstate run on windows masterless, all subsequent runs fail, because the highstate cache file is read-only with the error below:

IOError: [Errno 13] Permission denied: 'c:\\salt\\var\\cache\\salt\\minion\\highstate.cache.p'
Traceback (most recent call last):
File "", line 6, in
File "__main__.py", line 726, in
File "__main__.py", line 332, in bootstrap
File "__main__.py", line 359, in chainload
File "__main__.py", line 715, in _chainload
File "__main__.py", line 128, in
File "__main__salt-call__.py", line 14, in
File "c:\salt\salt-0.17.4.win-amd64\salt-0.17.4-py2.7.egg\salt\scripts.py", line 82, in salt_call
client.run()
File "c:\salt\salt-0.17.4.win-amd64\salt-0.17.4-py2.7.egg\salt\cli\__init__.py", line 313, in run
caller.run()
File "c:\salt\salt-0.17.4.win-amd64\salt-0.17.4-py2.7.egg\salt\cli\caller.py", line 137, in run
ret = self.call()
File "c:\salt\salt-0.17.4.win-amd64\salt-0.17.4-py2.7.egg\salt\cli\caller.py", line 78, in call
ret['return'] = func(*args, **kwargs)
File "c:\salt\salt-0.17.4.win-amd64\salt-0.17.4-py2.7.egg\salt\modules\state.py", line 268, in highstate
force=kwargs.get('force', False)
File "c:\salt\salt-0.17.4.win-amd64\salt-0.17.4-py2.7.egg\salt\state.py", line 2468, in call_highstate
with salt.utils.fopen(cfn, 'w+') as fp_:
File "c:\salt\salt-0.17.4.win-amd64\salt-0.17.4-py2.7.egg\salt\utils\__init__.py", line 1030, in fopen
fhandle = open(*args, **kwargs)
IOError: [Errno 13] Permission denied: 'c:\\salt\\var\\cache\\salt\\minion\\highstate.cache.p'