对将 Grain 传递给启动事件时出现的问题进行查错

Every time a Salt client starts, it passes the machine_id grain to SUSE Multi-Linux Manager. SUSE Multi-Linux Manager uses this grain to determine if the client is registered. This process requires a synchronous Salt call. Synchronous Salt calls block other processes, so if you have a lot of clients start at the same time, the process could create significant delays.

为了解决此问题,Salt 中引入了一项新功能来避免进行单独的同步 Salt 调用。

要使用此功能,您可以在支持该功能的客户端上向客户端配置中添加一个配置参数。

To make this process easier, you can use the mgr_start_event_grains.sls helper Salt state.

这仅适用于已注册的客户端。如果您是最近注册 Salt 客户端的,系统默认会添加此配置参数。

On the SUSE Multi-Linux Manager Server, at the command prompt, use this command to enable the start_event_grains configuration helper:

salt '*' state.sls util.mgr_start_event_grains

此命令会在客户端的配置文件中添加所需的配置,并在客户端重启时应用更改。如果您的客户端非常多,可以改用批处理模式执行该命令:

salt --batch-size 50 '*' state.sls mgr_start_event_grains