我正在通过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
这就是我卡住的地方,接下来我应该怎么做才能启动和运行?