厨师客户不定期 运行

chef client does not run as regular intervals

当我在我的节点机器上执行命令 chef-client -i 30 时,它先等待三十秒,然后只等待 运行ning。我想让它先 运行 然后只等待 30 秒。有什么建议么?

您可以使用

# chef-client; sleep 30

厨师选项没办法,实现是这样的

引用 documentation

-i SECONDS, --interval SECONDS The frequency (in seconds) at which the chef-client runs. When the chef-client is run at intervals, --splay and --interval values are applied before the chef-client run. Default value: 1800.

-s SECONDS, --splay SECONDS A random number between zero and splay that is added to interval. Use splay to help balance the load on the Chef server by ensuring that many chef-client runs are not occuring at the same interval. When the chef-client is run at intervals, --splay and --interval values are applied before the chef-client run.

如果您想以其他方式管理间隔,则必须自己动手,例如在无限循环中。