首页 文章

Saltstack test.ping需要30秒

提问于
浏览
0

我基本上有一个运行的准系统saltstack“集群” . 事实上,它实际上是同一台主机上的主人和小兵 .

这实际上是一个2部分的问题 .

1)salt-master需要很长时间才能启动 . 喜欢2分钟 . 调试日志看起来好像有几个线程进入循环加载/重新加载配置:

[DEBUG   ] Reading configuration from /etc/salt/minion.d/master.conf
[DEBUG   ] Reading configuration from /etc/salt/minion.d/master.conf
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: host.my.domain
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: host.my.domain
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Including configuration from '/etc/salt/minion.d/master.conf'
[DEBUG   ] Reading configuration from /etc/salt/minion.d/master.conf
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: host.my.domain
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Including configuration from '/etc/salt/minion.d/master.conf'
[DEBUG   ] Reading configuration from /etc/salt/minion.d/master.conf
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: host.my.domain
[DEBUG   ] Including configuration from '/etc/salt/minion.d/master.conf'
[DEBUG   ] Reading configuration from /etc/salt/minion.d/master.conf
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: host.my.domain
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] LazyLoaded local_cache.clean_old_jobs
[DEBUG   ] This salt-master instance has accepted 1 minion keys.
[DEBUG   ] The `dmidecode` binary is not available on the system. GPU grains will not be available.
[DEBUG   ] The `dmidecode` binary is not available on the system. GPU grains will not be available.
[DEBUG   ] The `dmidecode` binary is not available on the system. GPU grains will not be available.
[DEBUG   ] The `dmidecode` binary is not available on the system. GPU grains will not be available.
[DEBUG   ] The `dmidecode` binary is not available on the system. GPU grains will not be available.
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc

并且2)一旦它最终完成并且我可以使用它来使用它,只需一个简单的测试 . 这需要30秒:

time salt '*' test.ping

real    0m34.556s
user    0m12.230s
sys 0m0.500s

从minion调试日志:

[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] Decrypting the current master AES key
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] Decrypting the current master AES key
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] Decrypting the current master AES key
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem

这本质上是一个开箱即用的设置,没有状态或任何设置 . 有人可以帮我解决这些性能问题吗?

在覆盆子pi上运行Arch Linux,通过官方arch repo(https://www.archlinux.org/packages/community/any/salt-zmq/),版本7.2014安装 . 这些是在调试模式下手动运行的日志 . 没有特定的暂停,它只是运行在似乎是几个循环的几分钟内喷出上述(除其他外,但通常都与加载配置文件有关),直到它最终安定下来

1 回答

  • 2

    如果你在Raspberry Pi上运行master和minion - 这将是你的问题 .

    我在我的盐主人和盐爪子的真实硬件上 - 我在几秒钟内从 test.ping 模块获得结果 .

    主人也会在几秒钟内启动 .

相关问题