salt icon indicating copy to clipboard operation
salt copied to clipboard

msgpack broken in Windows minion since 0.17.0

Open otrempe opened this issue 13 years ago • 11 comments

Steps to reproduce:

  • Install Windows minion version 0.17.0 or 0.17.1, 32bit or 64 bit
  • On master, create a state file with this content:
my_file:
  file.managed:
    - name: 'C:\my_file.txt'
  • Issue the following command on the master:
    salt '*' state.sls my_file 
  • You get the following output in the minion debug log
[INFO    ] User ############ Executing command state.sls with jid 20131016144156828643
[DEBUG   ] Command details {'tgt_type': 'glob', 'jid': '20131016144156828643', 'tgt': '*', 'ret': '', 'user': '############', 'arg': ['my_file'], 'fun': 'state.sls'}
[DEBUG   ] Initializing COM library
[DEBUG   ] Uninitializing COM library
[WARNING ] The minion function caused an exception: Traceback (most recent call last):
  File "salt/minion.py", line 657, in _thread_return
  File "salt/modules/state.py", line 300, in sls
  File "salt/modules/state.py", line 86, in running
  File "salt/modules/saltutil.py", line 363, in is_running
  File "salt/modules/saltutil.py", line 391, in running
  File "salt/payload.py", line 95, in loads
  File "_unpacker.pyx", line 119, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:119)
UnpackValueError
[INFO    ] Returning information for job: 20131016144156828643

otrempe avatar Oct 18 '13 19:10 otrempe

Thanks, for posting this issue, @otrempe. I can confirm that this behavior occurs on the latest 0.17.1 Windows installers.

As I'm tracking this down, I think it might be due to bbfreeze not catching all required libraries. Still investigating.

UtahDave avatar Oct 18 '13 20:10 UtahDave

Is there a package that we can install manually, or should we switch back to 0.16.x until a fix is found?

jcollie avatar Oct 24 '13 19:10 jcollie

@jcollie As a temporary workaround, it worked for me deleting the minion cache. See also: https://github.com/saltstack/salt/issues/7707#issuecomment-26009314

eliasp avatar Oct 24 '13 19:10 eliasp

@eliasp that fixed the error noted above but I moved onto a new error


[INFO    ] Loading fresh modules for state activity
[INFO    ] Fetching file ** skipped **, latest already in cache 'salt://top.sls'
[INFO    ] Creating module dir 'c:\salt\var\cache\salt\minion\extmods\modules'
[INFO    ] Syncing modules for environment 'zenoss'
[INFO    ] Loading cache from salt://_modules, for zenoss)
[INFO    ] Caching directory '_modules/' for environment 'zenoss'
[INFO    ] Creating module dir 'c:\salt\var\cache\salt\minion\extmods\states'
[INFO    ] Syncing states for environment 'zenoss'
[INFO    ] Loading cache from salt://_states, for zenoss)
[INFO    ] Caching directory '_states/' for environment 'zenoss'
[INFO    ] Creating module dir 'c:\salt\var\cache\salt\minion\extmods\grains'
[INFO    ] Syncing grains for environment 'zenoss'
[INFO    ] Loading cache from salt://_grains, for zenoss)
[INFO    ] Caching directory '_grains/' for environment 'zenoss'
[INFO    ] Creating module dir 'c:\salt\var\cache\salt\minion\extmods\renderers'
[INFO    ] Syncing renderers for environment 'zenoss'
[INFO    ] Loading cache from salt://_renderers, for zenoss)
[INFO    ] Caching directory '_renderers/' for environment 'zenoss'
[INFO    ] Creating module dir 'c:\salt\var\cache\salt\minion\extmods\returners'
[INFO    ] Syncing returners for environment 'zenoss'
[INFO    ] Loading cache from salt://_returners, for zenoss)
[INFO    ] Caching directory '_returners/' for environment 'zenoss'
[INFO    ] Creating module dir 'c:\salt\var\cache\salt\minion\extmods\outputters
'
[INFO    ] Syncing outputters for environment 'zenoss'
[INFO    ] Loading cache from salt://_outputters, for zenoss)
[INFO    ] Caching directory '_outputters/' for environment 'zenoss'
[ERROR   ] An un-handled exception was caught by salt's global exception handler
:
ImportError: No module named audio
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 "salt/scripts.py", line 77, in salt_call
  File "salt/cli/__init__.py", line 303, in run
  File "salt/cli/caller.py", line 135, in run
  File "salt/cli/caller.py", line 78, in call
  File "salt/modules/state.py", line 257, in highstate
  File "salt/state.py", line 2304, in call_highstate
  File "salt/state.py", line 1927, in load_dynamic
  File "salt/state.py", line 553, in module_refresh
  File "site.py", line 548, in 
  File "site.py", line 526, in main
  File "site.py", line 94, in abs__file__
  File "email/__init__.py", line 79, in __getattr__
ImportError: No module named audio
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 "salt/scripts.py", line 77, in salt_call
  File "salt/cli/__init__.py", line 303, in run
  File "salt/cli/caller.py", line 135, in run
  File "salt/cli/caller.py", line 78, in call
  File "salt/modules/state.py", line 257, in highstate
  File "salt/state.py", line 2304, in call_highstate
  File "salt/state.py", line 1927, in load_dynamic
  File "salt/state.py", line 553, in module_refresh
  File "site.py", line 548, in 
  File "site.py", line 526, in main
  File "site.py", line 94, in abs__file__
  File "email/__init__.py", line 79, in __getattr__
ImportError: No module named audio

MASTER: Salt: 0.17.1 Python: 2.7.3 (default, Sep 26 2013, 20:03:06) Jinja2: 2.6 M2Crypto: 0.21.1 msgpack-python: 0.1.10 msgpack-pure: Not Installed pycrypto: 2.4.1 PyYAML: 3.10 PyZMQ: 13.0.0 ZMQ: 3.2.2

MINION: Salt: 0.17.1 Python: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] Jinja2: 2.7.1 M2Crypto: 0.21.1 msgpack-python: 0.3.0 msgpack-pure: Not Installed pycrypto: 2.6 PyYAML: 3.10 PyZMQ: 13.1.0 ZMQ: 3.2.2


SLS: 
my_file:
  file.managed:
    - name: 'c:\testfile.txt'

trebortech avatar Oct 26 '13 20:10 trebortech

OK, I think I've fixed these issue with this Windows Salt installer:
http://saltstack.com/downloads/Salt-Minion-0.17.1.1-AMD64-Setup.exe

Would you mind testing?

UtahDave avatar Oct 28 '13 18:10 UtahDave

UtahDave: Good news the ImportError is gone from my system but only after I removed the C:\salt\var\cache\salt\minion directory. I'm still getting the UnpackValueError initial error on my install.

Steps I took:

  1. Uninstalled previous salt-minion from Add-Remove programs.
  2. Removed the c:\salt directory
  3. Restarted Windows server
  4. Installed 0.17.1.1
  5. Did not start salt-minion from install window
  6. Removed key for minion from Master
  7. On Windows server opened cli with admin rights executed c:\salt\salt-minion.exe
  8. Added key to master
  9. Restarted salt-minion.exe
  10. Executed salt-call.exe state.highstate
  11. Removed c:\salt\var\cache\salt\minion
  12. Restarted salt-minion.exe
  13. Executed salt-call.exe state.highstate
  14. Test file was created successfully on c:\

OS: Windows 2003 SP2 in AWS

rboothzenoss avatar Oct 28 '13 19:10 rboothzenoss

@rboothzenoss Did you get a stacktrace the first time you ran it? Also, could you look at the security properties of c:\salt\var\cache\salt\minion are?

UtahDave avatar Oct 28 '13 19:10 UtahDave

@UtahDave hmmm... I executed the steps again and absolute success. Not sure what happened the first time but the error has cleared out. I actually did the steps twice and both times were successful.

trebortech avatar Oct 28 '13 20:10 trebortech

cool. good to hear. I'll do some more testing here. Let me know if you run into any other issues with this.

UtahDave avatar Oct 28 '13 21:10 UtahDave

@trebortech Thanks for the note! We also saw this exact behavior in addition to the 'no module named audio'. Looking forward to trying out the fixed version; I know at least one guy will be relieved to see it.

drawsmcgraw avatar Oct 29 '13 00:10 drawsmcgraw

New windows installers have been uploaded here:

http://docs.saltstack.com/topics/installation/windows.html

Several people have stated the these installers fix the problems seen above, so I'm going to close this issue.

If you're still seeing these issues, please feel free to reopen this issue.

Thanks for your help and for your patience!

UtahDave avatar Nov 01 '13 16:11 UtahDave