Saltstack test.ping需要30秒以上

时间:2014-12-11 22:22:42

标签: salt-stack

我基本上有一个准系统saltstack" cluster"运行。事实上,它实际上是同一主机上的主人和小兵。

这实际上是一个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

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

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

1 个答案:

答案 0 :(得分:2)

如果你在Raspberry Pi上运行主人和奴才 - 这将是你的问题。

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

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