Permission denied: 'c:\\salt\\var\\cache\\salt\\minion\\highstate.cache.p'
I seem to get this error when running this command: salt 'admatriusy02c' state.sls npp
error: [WARNING ] The minion function caused an exception: Traceback (most recent call last): File "salt/minion.py", line 722, in _thread_return File "salt/modules/state.py", line 382, in sls File "salt/utils/init.py", line 930, in fopen IOError: [Errno 13] Permission denied: 'c:\salt\var\cache\salt\minion\highstate.cache.p'
Can you try stopping your minion, deleting that cache directory, and restarting the minion to see if that solves your issue?
for some reason, this only worked when I did that the 2nd time, but at least, it seems to have fixed the issue. Thank you..
Same issue here, Windows 2008 R2 SP1 using Salt-Minion-0.17.4-AMD64-Setup.exe. I got the error below when running the highstate on a newly installed node
IOError: [Errno 13] Permission denied: 'c:\\salt\\var\\cache\\salt\\minion\\highstate.cache.p'
I stopped the salt-minion service, deleted the c:\salt\var\cache directory, then restarted the service. I then got the error below:
NameError: global name 'set_mode' is not defined
So I did another restart of the salt-minion service, and then it worked.
I am reopening this since this error is becoming a real nuisance. We're fully testing the Salt capabilities at this moment, and are testrunning a couple of windows servers.
They all seem to have this same issue after some idle time. Clearing the folder and restarting the minion solves this issue on a short term period, but at the next idle stage, I'm stuck with the same problem.
@UtahDave ping
I just upgraded to Salt-Minion-0.17.4-6-AMD64, and it seems this doesn't fix the issue yet.
@UtahDave, do you have any trouble replicating this on your own computers? I consistently get this when I build any minions from scratch. I just don't understand the mechanism by which the read-only bit is being set on this file, unless it's a pywin32 bug.
I wrote a dumb salt state that fixes this for me, win32 (xp and 7) and win64 (just 7). windows: cmd.run: - name: attrib -r C:\salt*.* /s - cwd: C:\
I found that after a fresh install, the state file hasn't been created yet. Anytime the high state is updated, the file gets the read-only flag set. The next time you try to push a high state, the state file can't be updated. Good thing the cmd.run module runs after the state is updated, so I can remove that pesky read only flag. I didn't want to spend the time it took to really solve the problem, so I just whacked it with the . hammer.
It is how I am currently fixing it. But it really is a dirty fix. Which I preferably don't have running on my system. But yes, it works that way.. On 6 Feb 2014 17:02, "Kai Meyer" [email protected] wrote:
I wrote a dumb salt state that fixes this for me, win32 (xp and 7) and win64 (just 7). windows: cmd.run:
- name: attrib -r C:\salt_._ /s
- cwd: C:\
I found that after a fresh install, the state file hasn't been created yet. Anytime the high state is updated, the file gets the read-only flag set. The next time you try to push a high state, the state file can't be updated. Good thing the cmd.run module runs after the state is updated, so I can remove that pesky read only flag. I didn't want to spend the time it took to really solve the problem, so I just whacked it with the _._hammer.
Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/9882#issuecomment-34337719 .
If you're getting this error, are you changing the user Salt is running as?
OK, @cachedout and I tracked this one down. The fix should be in the next bugfix release.
@TimothyVandenbrande can you test with the new 0.17.5 Windows Salt installer?
Thanks!
http://docs.saltstack.com/topics/installation/windows.html
So far so good.. I don't get the permission denied anymore. I only seem to keep getting this one: [INFO ] Executing command 'msiexec /i c:\salt\var\cache\salt\minion\extrn_files\base\opsdev\repo\win_bin\7zip\7z920-x64.msi" /qn None' in directory 'C:\Users\exh345'
Which is the None that he still appends to the install and msiexec doesn't really like that. I know how to overrule this with the extra_installflags, but still, this isn't bestpractice.
The appended None seems to be an issue that's appearing on all Windows package installs: #10434
@TimothyVandenbrande new installers are here: http://docs.saltstack.com/topics/installation/windows.html
Unfortunately, I wont be able to test that one before monday. But I will let you know when I did. On 15 Feb 2014 01:03, "David Boucha" [email protected] wrote:
@TimothyVandenbrande https://github.com/TimothyVandenbrande new installers are here: http://docs.saltstack.com/topics/installation/windows.html
Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/9882#issuecomment-35140648 .
Thank you Dave, the new installer did the job. My 2 major obstruction have been removed.
Thanks for the report! On Feb 17, 2014 1:27 AM, "TimothyVandenbrande" [email protected] wrote:
Thank you Dave, the new installer did the job. My 2 major obstruction have been removed.
Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/9882#issuecomment-35236826 .