Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes discarding host events when from_q queue is None #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dgilm
Copy link
Contributor

@dgilm dgilm commented Sep 26, 2014

This is a grave bug because every time ask_reinit() is called from create_message() and self.from_q is None, the complete message is discarded due a captured Exception.

2014-09-26 14:18:39,417 [1411733919] Error :   [broker-master] [Canopsis] Error: there was an error while trying to create message for host
2014-09-26 14:18:39,417 [1411733919] Error :   [broker-master] [Canopsis] Error: 'NoneType' object has no attribute 'put'

This is a grave bug because every time ask_reinit() is called from create_message() and self.from_q is None, the complete message is discarded due a captured Exception.

```
2014-09-26 14:18:39,417 [1411733919] Error :   [broker-master] [Canopsis] Error: there was an error while trying to create message for host
2014-09-26 14:18:39,417 [1411733919] Error :   [broker-master] [Canopsis] Error: 'NoneType' object has no attribute 'put'
```
@dgilm
Copy link
Contributor Author

dgilm commented Sep 26, 2014

You are right @Seb-Solon, it's a bad idea to just ignore the error. I've just modified the patch in order to warn about the attribute error. It's better than nothing.

Also, if you don't capture the error, you will probably lose a lot of messages because there is a huge global exception around the create_message() method, which makes a call to the ask_reinit buggy method.

@dgilm
Copy link
Contributor Author

dgilm commented Oct 22, 2014

Any advance on this? Look at my logs with the patch applied:

# grep "Asking reinit: from_q queue is not initialized" /var/log/shinken/brokerd.log* | wc -l
3412

@gst
Copy link

gst commented Nov 5, 2014

looking at this..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants