Reputation: 1519
I'm quite new to SaltStack. I've setup a salt-master and a salt-minion (via salt-cloud on my ESXi). It works fine so far. However, I cannot get dockerng to run any function on my minion. It always returns 'dockerng.xxxx' is not available
:
# salt '*' test.ping
minion1:
True
$ salt '*' dockerng.version
minion1:
'dockerng.version' is not available.
However, When I call the same with salt-call directly on the minion:
$ salt-call dockerng.version
[INFO ] Determining pillar cache
local:
----------
ApiVersion:
1.23
Any hints/ideas?
Upvotes: 1
Views: 1375
Reputation: 4202
I encountered this problem while using an image with docker pre-installed. The solution that works for me is to restart the salt-minion
daemon:
salt-minion:
pkg:
- installed
- name: salt-minion
service.running:
- enable: True
- require:
- pkg: salt-minion
- service: docker
- pip: docker-py
- watch:
- pip: docker-py
taken from http://humankeyboard.com/saltstack/2013/how-to-restart-salt-minion.html
Unfortunately, the dockerng module doesn't work until the second run from the master. I'm still playing with watch
and reload_modules
trying to get this to work.
https://docs.saltstack.com/en/latest/ref/states/index.html#reloading-modules
Upvotes: 0
Reputation: 11
I just encountered exactly the same situation. Installing 'docker-py' on the salt-master worked for me. Of course, as suggested by Utah_Dave, docker-py would also be needed on any minion that would be targeted by dockerng.
Upvotes: 1
Reputation: 4581
Have you installed the python docker module on the minion itself? That's a requirement.
Upvotes: 1