saltstack/salt — Issue #364: salt-minion on Windows 7 64 bit
Author: UtahDave
Created: 2011-12-16 20:18:49+00:00
State: open

After consulting with thatch45 a few weeks ago I started working to get salt-minion running on Windows.
Windows 7 64 bit
Python 2.7

After getting all the dependencies installed I found I had to change several hard coded paths. For example in config.py there are several locations in the minion config where you have something like '/etc/salt/minion' I changed those to os.path.join('etc', 'salt', 'minion') After making these changes I was able to get the minion to run and wait for commands. It does say "Missing Configuration File:" but it sits there and waits for commands.

When I run a command on the salt-master (running on Ubuntu) I get the following stack trace in the terminal on the Windows box running salt-minion:

Traceback (most recent call last):
File "salt-minion", line 20, in
main()
File "salt-minion", line 15, in main
minion.start()
File "C:\Python27\lib\site-packages\salt\__init__.py", line 158, in start
minion.tune_in()
File "C:\Python27\lib\site-packages\salt\minion.py", line 302, in tune_in
self._handle_payload(payload)
File "C:\Python27\lib\site-packages\salt\minion.py", line 99, in _handle_paylo
ad
'clear': self._handle_clear}[payload['enc']](payload['load'])
File "C:\Python27\lib\site-packages\salt\minion.py", line 131, in _handle_aes
self._handle_decoded_payload(data)
File "C:\Python27\lib\site-packages\salt\minion.py", line 156, in _handle_deco
ded_payload
target=lambda: self._thread_return(data)
File "C:\Python27\lib\multiprocessing\process.py", line 130, in start
self._popen = Popen(self)
File "C:\Python27\lib\multiprocessing\forking.py", line 271, in __init__
dump(process_obj, to_child, HIGHEST_PROTOCOL)
File "C:\Python27\lib\multiprocessing\forking.py", line 193, in dump
ForkingPickler(file, protocol).dump(obj)
File "C:\Python27\lib\pickle.py", line 224, in dump
self.save(obj)
File "C:\Python27\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "C:\Python27\lib\pickle.py", line 419, in save_reduce
save(state)
File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "C:\Python27\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
File "C:\Python27\lib\pickle.py", line 681, in _batch_setitems
save(v)
File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "C:\Python27\lib\pickle.py", line 748, in save_global
(obj, module, name))
pickle.PicklingError: Can't pickle at 0x0000000003329D68>: it
's not found as salt.minion.

C:\Python27\Scripts>Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\multiprocessing\forking.py", line 374, in main
self = load(from_parent)
File "C:\Python27\lib\pickle.py", line 1378, in load
return Unpickler(file).load()
File "C:\Python27\lib\pickle.py", line 858, in load
dispatch[key](self)
File "C:\Python27\lib\pickle.py", line 880, in load_eof
raise EOFError
EOFError

If I change multiprocessing to False in the minion section of config.py I get a different error:

C:\Python27\Scripts>python salt-minion
Missing configuration file:
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 552, in __bootstrap_inner
self.run()
File "C:\Python27\lib\threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\Python27\lib\site-packages\salt\minion.py", line 165, in
target=lambda: self._thread_return(data)
File "C:\Python27\lib\site-packages\salt\minion.py", line 200, in _thread_retu
rn
self._return_pub(ret)
File "C:\Python27\lib\site-packages\salt\minion.py", line 254, in _return_pub
if hasattr(self.functions[ret['fun']], '__outputter__'):
KeyError: 'test.ping'