Piotr Kliczewski has posted comments on this change.

Change subject: events: ignore events when jsonrpc binding not available
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/56028/1//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: events: ignore events when jsonrpc binding not available
Line 8: 
Line 9: When vdsm is booting and jsonrpc binding was not yet created or jsonrpc
Line 10: is disable we want to ignore any events that are sent.
> Looks like we need to change the boot order, so jsonrpc *is* available when
Being available is not prerequisite to send an event. We need to have a 
connection open to do so. If the connection is not there we are dropping events 
anyway.
Line 11: 
Line 12: 
Line 13: Bug-Url: https://bugzilla.redhat.com/1323969
Line 14: Change-Id: I5dac762d1e8662d24e8e461c841328116a18b07e


https://gerrit.ovirt.org/#/c/56028/1/vdsm/clientIF.py
File vdsm/clientIF.py:

Line 163:     def _send_notification(self, message):
Line 164:         try:
Line 165:             self.bindings['jsonrpc'].reactor.server.send(
Line 166:                 message, config.get('addresses', 'event_queue'))
Line 167:         except KeyError:
> just check if key exist. I don't like the approach for calling things witho
It is a matter of whether you want to go with positive or negative approach. In 
our case negative flow would happen very rarely so why to check every time for 
positive flow?
Line 168:             self.log.warning("Attempt to send an event when jsonrpc 
binding"
Line 169:                              " not available")
Line 170: 
Line 171:     def contEIOVms(self, sdUUID, isDomainStateValid):


-- 
To view, visit https://gerrit.ovirt.org/56028
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5dac762d1e8662d24e8e461c841328116a18b07e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to