I am trying to sync a custom module with saltutil.sync_modules, but nothing happens:
$ salt-ssh -c config '*' test.ping
[WARNING ] Warning: sshpass is not present, so password-based authentication is not available.
host4:
True
host3:
True
$ salt-ssh -c config '*' saltutil.sync_modules
[WARNING ] Warning: sshpass is not present, so password-based authentication is not available.
host3:
host4:
root_dir: /Users/xxx/Desktop/salt
user: xxx
pki_dir: pki
cachedir: cache
file_roots:
base:
- /Users/xxx/Desktop/salt/file_root
$ find /Users/xxx/Desktop/salt/file_root
/Users/xxx/Desktop/salt/file_root
/Users/xxx/Desktop/salt/file_root/_modules
/Users/xxx/Desktop/salt/file_root/_modules/some_module.py
Below the command again with some debug output. BTW, should I be worried about these lines at the end:
[CRITICAL] Unable to import msgpack or msgpack_pure python modules
Exception AttributeError: "'MinionEvent' object has no attribute 'cpub'" in <bound method MinionEvent.__del__ of <salt.utils.event.MinionEvent object at 0x102522c10>> ignored
(virtualenv)xxx@xxx1:salt $ salt-ssh -l debug -c config '*' saltutil.sync_modules
[DEBUG ] Reading configuration from /Users/xxx/Desktop/salt/config/master
[DEBUG ] loading log_handlers in ['/Users/xxx/Desktop/salt/cache/extmods/log_handlers', '/Users/xxx/Desktop/salt/virtualenv/lib/python2.7/site-packages/salt/log/handlers']
[DEBUG ] Skipping /Users/xxx/Desktop/salt/cache/extmods/log_handlers, it is not a directory
[DEBUG ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG ] Configuration file path: /Users/xxx/Desktop/salt/config/master
[WARNING ] Warning: sshpass is not present, so password-based authentication is not available.
[DEBUG ] MasterEvent PUB socket URI: ipc:///Users/xxx/Desktop/salt/cache/.salt-unix/master_event_pub.ipc
[DEBUG ] MasterEvent PULL socket URI: ipc:///Users/xxx/Desktop/salt/cache/.salt-unix/master_event_pull.ipc
[DEBUG ] loading roster in ['/Users/xxx/Desktop/salt/cache/extmods/roster', '/Users/xxx/Desktop/salt/virtualenv/lib/python2.7/site-packages/salt/roster']
[DEBUG ] Skipping /Users/xxx/Desktop/salt/cache/extmods/roster, it is not a directory
[DEBUG ] loading render in ['/Users/xxx/Desktop/salt/cache/extmods/renderers', '/Users/xxx/Desktop/salt/virtualenv/lib/python2.7/site-packages/salt/renderers']
[DEBUG ] Skipping /Users/xxx/Desktop/salt/cache/extmods/renderers, it is not a directory
[DEBUG ] Rendered data from file: /Users/xxx/Desktop/salt/config/roster:
xxx3:
host: x.x.x.x # The IP addr or DNS hostname
user: salt # Remote executions will be executed as user fred
sudo: True # Whether to sudo to root, not enabled by default
xxx4:
host: y.y.y.y # The IP addr or DNS hostname
user: salt # Remote executions will be executed as user fred
sudo: True # Whether to sudo to root, not enabled by default
[DEBUG ] Results of YAML rendering:
OrderedDict([('xxx3', OrderedDict([('host', 'x.x.x.x'), ('user', 'salt'), ('sudo', True)])), ('xxx4', OrderedDict([('host', 'y.y.y.y'), ('user', 'salt'), ('sudo', True)]))])
[DEBUG ] loading wrapper in ['/Users/xxx/Desktop/salt/cache/extmods/wrapper', '/Users/xxx/Desktop/salt/virtualenv/lib/python2.7/site-packages/salt/client/ssh/wrapper']
[DEBUG ] Skipping /Users/xxx/Desktop/salt/cache/extmods/wrapper, it is not a directory
[DEBUG ] loading wrapper in ['/Users/xxx/Desktop/salt/cache/extmods/wrapper', '/Users/xxx/Desktop/salt/virtualenv/lib/python2.7/site-packages/salt/client/ssh/wrapper']
[DEBUG ] Skipping /Users/xxx/Desktop/salt/cache/extmods/wrapper, it is not a directory
[DEBUG ] Performing shimmed command as follows:
/bin/sh << 'EOF'
for py_candidate in \
python27 \
python2.7 \
python26 \
python2.6 \
python2 \
python ;
do
if [ $(which $py_candidate 2>/dev/null) ]
then
PYTHON=$(which $py_candidate)
break
fi
done
SALT=/tmp/.salt/salt-call
if [ md5 = 'md5' ]
then
for md5_candidate in \
md5sum \
md5 ;
do
if [ $(which $md5_candidate 2>/dev/null) ]
then
SUMCHECK=$(which $md5_candidate)
break
fi
done
else
SUMCHECK=md5
fi
if [ $SUMCHECK = '/sbin/md5' ]
then
CUT_MARK=4
else
CUT_MARK=1
fi
if [ -f $SALT ]
then
if [ $(cat /tmp/.salt/version) != 0.17.0 ]
then
sudo rm -rf /tmp/.salt && install -m 0700 -d /tmp/.salt
if [ $? -ne 0 ]; then
exit 1
fi
echo "_edbc7885e4f9aac9b38b35999b68d015148caf467b78fa39c05f669cf0f89878"
echo "deploy"
exit 1
fi
else
PY_TOO_OLD=$($PYTHON -c 'import sys; print sys.hexversion < 0x02060000')
if [ $PY_TOO_OLD = 'True' ];
then
echo "Python too old" >&2
exit 1
fi
if [ -f /tmp/.salt/salt-thin.tgz ]
then
[ $($SUMCHECK /tmp/.salt/salt-thin.tgz | cut -f$CUT_MARK -d' ') = b2f173e3ed87496c7635bfe53989f121 ] && sudo tar opxzvf /tmp/.salt/salt-thin.tgz -C /tmp/.salt
else
install -m 0700 -d /tmp/.salt
echo "_edbc7885e4f9aac9b83b359996b8d015148caf46b778fa39c05f669c0ff89878"
echo "deploy"
exit 1
fi
fi
echo {root_dir: /tmp/.salt/running_data}
> /tmp/.salt/minion
echo "_edbc7885e4f9aac9b83b35999b68d015148cfa467b78fa39c05f6690cff89878"
sudo $PYTHON $SALT --local --out json -l quiet saltutil.sync_modules -c /tmp/.salt
EOF
[DEBUG ] Performing shimmed command as follows:
/bin/sh << 'EOF'
for py_candidate in \
python27 \
python2.7 \
python26 \
python2.6 \
python2 \
python ;
do
if [ $(which $py_candidate 2>/dev/null) ]
then
PYTHON=$(which $py_candidate)
break
fi
done
SALT=/tmp/.salt/salt-call
if [ md5 = 'md5' ]
then
for md5_candidate in \
md5sum \
md5 ;
do
if [ $(which $md5_candidate 2>/dev/null) ]
then
SUMCHECK=$(which $md5_candidate)
break
fi
done
else
SUMCHECK=md5
fi
if [ $SUMCHECK = '/sbin/md5' ]
then
CUT_MARK=4
else
CUT_MARK=1
fi
if [ -f $SALT ]
then
if [ $(cat /tmp/.salt/version) != 0.17.0 ]
then
sudo rm -rf /tmp/.salt && install -m 0700 -d /tmp/.salt
if [ $? -ne 0 ]; then
exit 1
fi
echo "_edbc7885e4f9aac9b8b335999b68d015418caf467b87fa39c05f669c0ff89878"
echo "deploy"
exit 1
fi
else
PY_TOO_OLD=$($PYTHON -c 'import sys; print sys.hexversion < 0x02060000')
if [ $PY_TOO_OLD = 'True' ];
then
echo "Python too old" >&2
exit 1
fi
if [ -f /tmp/.salt/salt-thin.tgz ]
then
[ $($SUMCHECK /tmp/.salt/salt-thin.tgz | cut -f$CUT_MARK -d' ') = b2f7133eed8749c67365bfe53989f121 ] && sudo tar opxzvf /tmp/.salt/salt-thin.tgz -C /tmp/.salt
else
install -m 0700 -d /tmp/.salt
echo "_edbc7885e4f9aac9b83b35999b68d015148caf467b78fa39c05f669c0ff89878"
echo "deploy"
exit 1
fi
fi
echo {root_dir: /tmp/.salt/running_data}
> /tmp/.salt/minion
echo "_edbc7885e4f9aac9b83b35999b68d105148caf4677b8fa39c05f669c0ff89878"
sudo $PYTHON $SALT --local --out json -l quiet saltutil.sync_modules -c /tmp/.salt
EOF
[DEBUG ] STDOUT y.y.y.y
{root_dir: /tmp/.salt/running_data}
_edbc7885e4f9aac9b83b39599b68d051148caf467b87fa39c05f669c0ff89878
{
"local": []
}
[DEBUG ] STDERR y.y.y.y
[DEBUG ] loading output in ['/Users/xxx/Desktop/salt/cache/extmods/output', '/Users/xxx/Desktop/salt/virtualenv/lib/python2.7/site-packages/salt/output']
[DEBUG ] Skipping /Users/xxx/Desktop/salt/cache/extmods/output, it is not a directory
[DEBUG ] Loaded no_out as virtual quiet
[DEBUG ] Loaded json_out as virtual json
[DEBUG ] Loaded yaml_out as virtual yaml
[DEBUG ] Loaded pprint_out as virtual pprint
xxx4:
[DEBUG ] STDOUT x.x.x.x
{root_dir: /tmp/.salt/running_data}
_edbc7885e4f9aac9b833b5999b68d015148acf467b78fa39c056f69c0ff89878
{
"local": []
}
[DEBUG ] STDERR x.x.x.x
[CRITICAL] Unable to import msgpack or msgpack_pure python modules
Exception AttributeError: "'MinionEvent' object has no attribute 'cpub'" in <bound method MinionEvent.__del__ of <salt.utils.event.MinionEvent object at 0x102522c10>> ignored
[DEBUG ] loading output in ['/Users/xxx/Desktop/salt/cache/extmods/output', '/Users/xxx/Desktop/salt/virtualenv/lib/python2.7/site-packages/salt/output']
[DEBUG ] Skipping /Users/xxx/Desktop/salt/cache/extmods/output, it is not a directory
[DEBUG ] Loaded no_out as virtual quiet
[DEBUG ] Loaded json_out as virtual json
[DEBUG ] Loaded yaml_out as virtual yaml
[DEBUG ] Loaded pprint_out as virtual pprint
xxx3:
(virtualenv)xxx@xxx1:salt $
Hi Marc,
It's just scp, no ZeroMQ at the time being.
Yes, this is on the list. salt-ssh is rapidly improving but still doesn't support all the bells and whistles. =)
--