我创建了一个简单的th反应堆,它可以工作,但是现在我正尝试执行HTTP后查询,但它不起作用。
这是th反应堆:
memusage_checker:
reg.list:
- name: minion1
- add: memusage
- match: salt/beacon/*/memusage/
- stamp: True
- prune: 50
check.gt:
- value: 80
shell_test:
runner.cmd:
- func: http.query
- arg:
- http://192.168.0.103:8000/api/v2/test_reactor/
- kwargs:
method: POST
- require:
- check: memusage_checker
使用此反应堆,反应堆发动机未加载。
我看到与check
反应类型有关的错误,但无法解决。
这是输出:
[DEBUG ] Reactor is populating check client cache
[DEBUG ] Closing IPCMessageSubscriber instance
[ERROR ] An un-handled exception from the multiprocessing process 'Reactor-4:1' was caught:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/utils/process.py", line 897, in wrapped_run_func
return run_func()
File "/usr/lib/python3/dist-packages/salt/utils/reactor.py", line 309, in run
self.call_reactions(chunks)
File "/usr/lib/python3/dist-packages/salt/utils/reactor.py", line 232, in call_reactions
self.wrap.run(chunk)
File "/usr/lib/python3/dist-packages/salt/utils/reactor.py", line 373, in run
self.populate_client_cache(low)
File "/usr/lib/python3/dist-packages/salt/utils/reactor.py", line 365, in populate_client_cache
self.client_cache[reaction_type] = self.reaction_class[reaction_type](
KeyError: 'check'
[CRITICAL] Engine 'reactor' could not be started!
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/engines/__init__.py", line 135, in run
self.engine[self.fun](**kwargs)
File "/usr/lib/python3/dist-packages/salt/engines/reactor.py", line 35, in start
salt.utils.reactor.Reactor(__opts__).run()
File "/usr/lib/python3/dist-packages/salt/utils/process.py", line 911, in wrapped_run_func
six.reraise(*sys.exc_info())
File "/usr/lib/python3/dist-packages/salt/ext/six.py", line 693, in reraise
raise value
File "/usr/lib/python3/dist-packages/salt/utils/process.py", line 897, in wrapped_run_func
return run_func()
File "/usr/lib/python3/dist-packages/salt/utils/reactor.py", line 309, in run
self.call_reactions(chunks)
File "/usr/lib/python3/dist-packages/salt/utils/reactor.py", line 232, in call_reactions
self.wrap.run(chunk)
File "/usr/lib/python3/dist-packages/salt/utils/reactor.py", line 373, in run
self.populate_client_cache(low)
File "/usr/lib/python3/dist-packages/salt/utils/reactor.py", line 365, in populate_client_cache
self.client_cache[reaction_type] = self.reaction_class[reaction_type](
KeyError: 'check'
我正在使用盐3001.1
谢谢!