pip show Twisted
Name: Twisted
Version: 15.2.1
pip show moira-worker
Name: moira-worker
Version: 1.2.1
curl -H "Content-type: application/json;charset=UTF-8" --data-binary @/opt/moira/alerts/5.load-average.json -s -X PUT http://127.0.0.1:8081/api/trigger/61e981ae-6144-4aee-8b44-9a2931a12aef
5.load-average.json content here http://pastebin.com/UkGZSrHW
failed with error in api.log
2016-05-19 11:03:10+0000 [HiredisProtocol,client] Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 588, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1184, in gotResult
_inlineCallbacks(r, g, deferred)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/local/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
--- ---
File "/usr/local/lib/python2.7/dist-packages/moira/api/request.py", line 91, in wrapper
yield f(resource, request)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/local/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/local/lib/python2.7/dist-packages/moira/api/resources/trigger.py", line 73, in render_PUT
yield self.save_trigger(request, self.trigger_id, "trigger updated")
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/local/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/local/lib/python2.7/dist-packages/moira/api/request.py", line 31, in decorator
yield f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/local/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/local/lib/python2.7/dist-packages/moira/api/request.py", line 82, in decorator
yield f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/local/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/local/lib/python2.7/dist-packages/moira/api/resources/redis.py", line 31, in save_trigger
yield self.db.accuireTriggerCheckLock(trigger_id, 10)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1128, in _inlineCallbacks
result = g.send(result)
File "/usr/local/lib/python2.7/dist-packages/moira/db.py", line 951, in accuireTriggerCheckLock
yield task.deferLater(reactor, 0.5, lambda: None)
exceptions.NameError: global name 'task' is not defined
2016-05-19 11:03:10+0000 [-] - 0.028 "PUT /api/trigger/61e981ae-6144-4aee-8b44-9a2931a12aef? HTTP/1.0" 500 614