--
您收到此邮件是因为您订阅了Google网上论坛上“中国SaltStack用户组”群组中的主题。
要退订此主题,请访问https://groups.google.com/d/topic/saltstack-users-cn/2Nz77qIUwMw/unsubscribe。
要退订此群组及其所有主题,请发送电子邮件到saltstack-users...@googlegroups.com。
要发帖到此群组,请发送电子邮件至saltstack...@googlegroups.com。
访问此群组:http://groups.google.com/group/saltstack-users-cn。
要在网络上查看此讨论,请访问https://groups.google.com/d/msgid/saltstack-users-cn/7e875a10-bd7a-46cf-8a1c-8ffb97a8ab85%40googlegroups.com。
要查看更多选项,请访问https://groups.google.com/d/optout。

--
您收到此邮件是因为您订阅了Google网上论坛上的“中国SaltStack用户组”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到saltstack-users...@googlegroups.com。
要发帖到此群组,请发送电子邮件至saltstack...@googlegroups.com。
访问此群组:http://groups.google.com/group/saltstack-users-cn。
要在网络上查看此讨论,请访问https://groups.google.com/d/msgid/saltstack-users-cn/CAEad1GMfro%2BWmiBH-KxQnvND%2B2C0wZBjcFTMfT0A8aR05Xw7Cw%40mail.gmail.com。
要查看更多选项,请访问https://groups.google.com/d/optout。
这个是因为默认情况下, Salt Minion的对于Master的IP的处理流程是如果是域名, 则进行解析, 解析到的IP作为Master的IP后建立长久的连接, 所以你之后更改DNS其实没有意义.
对于你这个需求, 其实可以借助Salt的Failover功能来实现, Faileover的实现逻辑是Minion定期向Master进行alive汇报, 如果不通或AES认证失败, 则切换为下一个地址. 如果全部都失败, 则重新开始, 再来一次.
实际操作是:
(1) 修改minion配置文件, 将原来 master: salt-master.example.com 修改为列表样式,即:
<code>
master:
</code>
其中salt-master.example.com为master对应的域名, 请根据实际情况进行调整
(2) 继续修改minion配置文件, 增加如下配置:
<code>
master_type: failover
master_alive_interval: 10
</code>
master_type指定类型为failover, master_alive_interval指定alive的间隔, 单位为秒.
(3) 修改完毕后, 重启minion服务即可.
这样就可以保证定期对Master进行Alive汇报, 如果失败, 则重新解析进行重连.
官方有关于本问题的Issue: https://github.com/saltstack/salt/issues/10032
要在网络上查看此讨论,请访问https://groups.google.com/d/msgid/saltstack-users-cn/tencent_69F87D4B09B6B83D5D905605%40qq.com。
要查看更多选项,请访问https://groups.google.com/d/optout。