naparuba/shinken — pull request #1232 by ReAzem (2014-06-20 21:08:03+00:00)
Title: Feature: Receivers can now receive passive check results for unconfigured hosts

Receivers/arbiters can now receive passive check results for unconfigured hosts. They will generate an ``` unknown_[host|service]_check_result ``` brok that will be consumed by the broker.

This is disabled by default, the new broks won't be generated unless ``` accept_passive_unknown_checks ``` is set.

``` receiverdaemon.py ```
- Implement IBroks
- Instead of __removing processed commands__ from ``` self.external_commands ```, we __add unprocessed commands__ to it. This prevents unknown check results from being sent to the arbiter since they would not be removed.
- Fixed a race condition where the arbiter could get the commands before were removed from ``` self.external_commands ```
- Fixed a race condition where new commands could be removed without being processed if they were added between line 271 and line 276. We now use a buffer, ``` commands_to_process ```.

``` brokerdaemon.py ```
- Now gets new broks from receivers.

``` external_command.py ```
- Fixed a bug where the warning ```Passive check result was received for host '%s', but the host could not be found!``` would not be logged if the command was received by the receiver
- Removed the warning and instead produce an ``` unknown_[host|service]_check_result ``` brok.

``` realm.py ```
- Added Receivers to Brokers conf.

``` reactionnerlink.py, pollerlink.py and satellitelink.py ```
- Removed ```passive``` property from ``` reactionnerlink.py and pollerlink.py ``` and moved it to ```satellitelink.py```. It would cause a crash on ```give_satellite_cfg()``` because the Receivers did not have the ```passive``` property.

``` property.py ```
- ``` BoolProp.pythonize ``` is now static. I use it in ``` arbiterdaemon.py ```.