首页 > 解决方案 > Saltstack 模块不可用

问题描述

尝试运行 sls 但盐告诉我该功能不可用

我的sls 必须创建一个 mongodump 文件

create-dump:
  module.run:
   - name: docker.run
   - m_name: mongo
   - cmd: 'mongodump --out=/Mongodump

当我运行 salt minion state.sls sls 时,我看到:

ID: create-dump
    Function: module.run
        Name: docker.run
      Result: False
     Comment: Module function docker.run is not available
     Started: 06:03:40.273781
    Duration: 728.234 ms
     Changes:

--版本

Salt Version:
           Salt: 3000

Dependency Versions:
           cffi: 1.9.1
       cherrypy: 3.5.0
       dateutil: 2.5.3
      docker-py: 4.3.1
          gitdb: 2.0.0
      gitpython: 2.1.1
         Jinja2: 2.8
        libgit2: 0.24.5
       M2Crypto: Not Installed
           Mako: 1.0.6
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: 1.3.7
      pycparser: 2.17
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.24.2
         Python: 3.5.3 (default, Jul  9 2020, 13:00:10)
   python-gnupg: 0.3.9
         PyYAML: 3.12
          PyZMQ: 16.0.2
          smmap: 2.0.1
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.1

System Versions:
           dist: debian 9.6
         locale: UTF-8
        machine: x86_64
        release: 4.9.0-8-amd64
         system: Linux
        version: debian 9.6


试过 pip3 卸载 docker - 不工作

如果我重新启动服务器 docker-py 降级到 1.10.6 版本

标签: salt-stack

解决方案


确保python-docker已安装在 minion 上。


推荐阅读