Python 以嵌套节点组为目标失败,返回“0”;仆从没有回来。[没有回应]”;,尽管主机通过其他标准作出响应
我对嵌套节点组有一个奇怪的问题,因为我似乎无法将它们作为目标。这是我的主配置文件的节点组部分:Python 以嵌套节点组为目标失败,返回“0”;仆从没有回来。[没有回应]”;,尽管主机通过其他标准作出响应,python,salt-stack,Python,Salt Stack,我对嵌套节点组有一个奇怪的问题,因为我似乎无法将它们作为目标。这是我的主配置文件的节点组部分: /etc/salt/master: nodegroups: linuxlabs: 'E@^pubbox' linuxtest: 'N@linuxlabs' 下面是一个在嵌套节点组上失败的目标示例,尽管可以分别以父节点组和主机为目标 [root@salt-master ~]# salt 'pubbox10.example.com' test.ping pubbox10.example.co
/etc/salt/master:
nodegroups:
linuxlabs: 'E@^pubbox'
linuxtest: 'N@linuxlabs'
下面是一个在嵌套节点组上失败的目标示例,尽管可以分别以父节点组和主机为目标
[root@salt-master ~]# salt 'pubbox10.example.com' test.ping
pubbox10.example.com:
True
[root@salt-master ~]# salt 'pubbox44.example.com' test.ping
pubbox44.example.com:
True
[root@salt-master ~]# salt -N linuxtest test.ping
pubbox10.example.com:
Minion did not return. [No response]
pubbox44.example.com:
Minion did not return. [No response]
[root@salt-master ~]# salt -N linuxlabs test.ping
pubbox44.example.com:
True
pubbox10.example.com:
True
添加“-l debug”或“-l trace”实际上并没有透露太多信息。实际上,在-l调试输出中,它显示嵌套节点组正在解析为正确的主机名。在“-l trace”输出中,终端被无情地垃圾邮件发送,并显示相同的消息:
[root@salt-master ~]# salt -N linuxtest test.ping -l trace
[DEBUG ] Reading configuration from /etc/salt/master
...
[DEBUG ] nodegroup_comp(linuxlabs) => ['(', 'E@^pubbox', ')']
[DEBUG ] nodegroup_comp(linuxtest) => ['(', '(', 'E@^pubbox', ')', ')']
...
[TRACE ] get_event() received = {'tag': 'salt/job/20160609132845009910/new', 'data': {'tgt_type': 'compound', 'jid': '20160
609132845009910', 'tgt': ['(', '(', 'E@^pubbox', ')', ')'], '_stamp': '2016-06-09T17:28:45.011228', 'user': 'root', 'arg': []
, 'fun': 'test.ping', 'minions': ['pubbox10.example.com', 'pubbox44.example.com']}}
[TRACE ] _get_event() waited 0 seconds and received nothing
[TRACE ] _get_event() waited 0 seconds and received nothing
[TRACE ] _get_event() waited 0 seconds and received nothing
[TRACE ] _get_event() waited 0 seconds and received nothing
[TRACE ] _get_event() waited 0 seconds and received nothing
[TRACE ] _get_event() waited 0 seconds and received nothing
[TRACE ] _get_event() waited 0 seconds and received nothing
...
^^此消息重复2000多次,几秒钟后在以下位置结束:
...
[TRACE ] _get_event() waited 0 seconds and received nothing
[TRACE ] _get_event() waited 0 seconds and received nothing
[TRACE ] _get_event() waited 0 seconds and received nothing
[DEBUG ] LazyLoaded no_return.output
[TRACE ] data = {'pubbox10.example.com': 'Minion did not return. [No response]'}
pubbox10.example.com:
Minion did not return. [No response]
[DEBUG ] LazyLoaded no_return.output
[TRACE ] data = {'pubbox44.example.com': 'Minion did not return. [No response]'}
pubbox44.example.com:
Minion did not return. [No response]
我尝试了嵌套节点组的一些变体。例如,我没有让父节点包含"E"前缀,而是将其改为"L",并显式列出主机名。同样的结果
这是我的salt--versions报告:
[root@salt-master ~]# salt --versions-report
Salt Version:
Salt: 2015.8.10
Dependency Versions:
Jinja2: 2.8
M2Crypto: 0.24.0
Mako: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
Python: 2.7.11 (default, Mar 24 2016, 22:19:35)
RAET: 0.6.5
Tornado: 4.3
ZMQ: 4.1.4
cffi: 1.5.2
cherrypy: 3.2.3
dateutil: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: 1.5.1
libgit2: Not Installed
libnacl: 1.4.4
msgpack-pure: Not Installed
msgpack-python: 0.4.7
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: Not Installed
smmap: Not Installed
timelib: Not Installed
System Versions:
dist:
machine: i86pc
release: 5.11
我是不是偶然发现了一只虫子?还是我对节点组的配置有误?值得一提的是,我检查了本版本和当前版本的Salt之间的发行说明,没有找到任何关于解决嵌套节点组问题的内容。这似乎是一个bug。您介意在SaltStack的github问题跟踪程序上打开一个问题吗? 谢谢