1

我正在通过SaltStack walk through在我的 ec2 集群上设置 salt。我刚刚编辑/etc/salt/minion并添加了我的盐大师的公共 dns。

master: ec2-54-201-153-192.us-west-2.compute.amazonaws.com

然后我重新启动了奴才。在调试模式下,这会输出以下内容

$ sudo salt-minion -l debug
[DEBUG   ] Reading configuration from /etc/salt/minion
[INFO    ] Using cached minion ID: localhost.localdomain
[DEBUG   ] loading log_handlers in ['/var/cache/salt/minion/extmods/log_handlers', '/usr/lib/python2.6/site-packages/salt/log/handlers']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/log_handlers, it is not a directory
[DEBUG   ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG   ] Configuration file path: /etc/salt/minion
[INFO    ] Setting up the Salt Minion "localhost.localdomain"
[DEBUG   ] Created pidfile: /var/run/salt-minion.pid
[DEBUG   ] Chowned pidfile: /var/run/salt-minion.pid to user: root
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] loading grain in ['/var/cache/salt/minion/extmods/grains', '/usr/lib/python2.6/site-packages/salt/grains']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/grains, it is not a directory
[DEBUG   ] Attempting to authenticate with the Salt Master at 172.31.21.27
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem

果然172.31.21.27是master的私有ip。到目前为止,这看起来还可以。根据演练,下一步是在 master 上接受 minions 键:

"Now that the minion is started it will generate cryptographic keys and attempt to 
connect to the master. The next step is to venture back to the master server and 
accept the new minion's public key."

但是,当我转到主节点并查找新密钥时,我看不到任何待处理的请求。

$ sudo salt-key -L
Accepted Keys:
Unaccepted Keys:
Rejected Keys:

并且 ping 测试也没有看到 minion:

$ sudo salt '*' test.ping

这就是我卡住的地方,接下来我应该怎么做才能启动和运行?

4

2 回答 2

1

关闭 iptables 并salt-key -L检查密钥是否显示。如果是这样,那么您需要在 master 上打开端口 4505 和 4506,以便 minion 能够连接到它。您可以lokkit -p tcp:4505 -p tcp:4506打开这些端口。

于 2014-05-22T18:51:26.180 回答
0

您可能需要4505/4506在 salt master 和 minion 之间添加规则security group。Salt master 需要这些端口才能与 minions 通信。

于 2017-04-16T17:48:18.073 回答