Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
automat...@ovirt.org has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 4: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Nir Soffer has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 4: (1 comment) https://gerrit.ovirt.org/#/c/47404/4/vdsm/virt/guestagent.py File vdsm/virt/guestagent.py: Line 377: if e.args[0] != errno.EBADF: Line 378: self.log.warning("desktopLock failed", exc_info=True) Line 379: except Exception: Line 380: self.log.warning("desktopLock failed with unexpected exception", Line 381: exc_info=True) We want to get rid of the non standard exc_info - and you are using self.log.exception elsewhere, so I would keep logging of unexpected exceptions like the other calls. To filter only socket.error with EBADF, you can do: except Exception as e: if isintance(e, socket.error) and e.args[0] == errno.EBADF: return # Expected because ... logging.exception("desktopLock failed") Line 382: Line 383: def desktopLogin(self, domain, user, password): Line 384: try: Line 385: self.log.debug("desktopLogin called") -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Vinzenz Feenstra has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 4: (1 comment) https://gerrit.ovirt.org/#/c/47404/4/vdsm/virt/guestagent.py File vdsm/virt/guestagent.py: Line 377: if e.args[0] != errno.EBADF: Line 378: self.log.warning("desktopLock failed", exc_info=True) Line 379: except Exception: Line 380: self.log.warning("desktopLock failed with unexpected exception", Line 381: exc_info=True) > We want to get rid of the non standard exc_info - and you are using self.lo Done Line 382: Line 383: def desktopLogin(self, domain, user, password): Line 384: try: Line 385: self.log.debug("desktopLogin called") -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Vinzenz Feenstra has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 4: Verified+1 -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
gerrit-hooks has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Vinzenz Feenstra has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 4: -Verified -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Vinzenz Feenstra has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: Verified+1 -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Francesco Romani has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Nir Soffer has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: (1 comment) https://gerrit.ovirt.org/#/c/47404/5/vdsm/virt/guestagent.py File vdsm/virt/guestagent.py: Line 373: try: Line 374: self.log.debug("desktopLock called") Line 375: self._forward("lock-screen") Line 376: except Exception as e: Line 377: if isinstance(e, socket.error) and e.args[0] == errno.EBADF: Can you explain how we can get bad file descriptor here? This smell like wrong file descriptor life-cycle handling, and this change my hide the real issue. Line 378: return # Expected when not connected/closed socket Line 379: self.log.exception("desktopLock failed with unexpected exception") Line 380: Line 381: def desktopLogin(self, domain, user, password): -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Vinzenz Feenstra has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: (1 comment) https://gerrit.ovirt.org/#/c/47404/5/vdsm/virt/guestagent.py File vdsm/virt/guestagent.py: Line 373: try: Line 374: self.log.debug("desktopLock called") Line 375: self._forward("lock-screen") Line 376: except Exception as e: Line 377: if isinstance(e, socket.error) and e.args[0] == errno.EBADF: > Can you explain how we can get bad file descriptor here? well one thread closes the socket, the other tries to send a desktopLock afterwards Line 378: return # Expected when not connected/closed socket Line 379: self.log.exception("desktopLock failed with unexpected exception") Line 380: Line 381: def desktopLogin(self, domain, user, password): -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Nir Soffer has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: (1 comment) https://gerrit.ovirt.org/#/c/47404/5/vdsm/virt/guestagent.py File vdsm/virt/guestagent.py: Line 373: try: Line 374: self.log.debug("desktopLock called") Line 375: self._forward("lock-screen") Line 376: except Exception as e: Line 377: if isinstance(e, socket.error) and e.args[0] == errno.EBADF: > well one thread closes the socket, the other tries to send a desktopLock af Sounds fishy. Can you point me to the relevant code? Line 378: return # Expected when not connected/closed socket Line 379: self.log.exception("desktopLock failed with unexpected exception") Line 380: Line 381: def desktopLogin(self, domain, user, password): -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Nir Soffer has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: Code-Review-1 Lets wait until we understand this failure. -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Nir Soffer has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: (1 comment) https://gerrit.ovirt.org/#/c/47404/5/vdsm/virt/guestagent.py File vdsm/virt/guestagent.py: Line 373: try: Line 374: self.log.debug("desktopLock called") Line 375: self._forward("lock-screen") Line 376: except Exception as e: Line 377: if isinstance(e, socket.error) and e.args[0] == errno.EBADF: > Sounds fishy. Can you point me to the relevant code? I checked guest agent code and python socket.py, and this seems correct. A socket contains either a socket._realsocket or socket._closedsocket object. socket._closedsocket object raise socket.error with EBADF for any operation, so after closing a socket, we have a race free way to detect operation on closed socket. So this change is correct, but why only for desktopLock? Line 378: return # Expected when not connected/closed socket Line 379: self.log.exception("desktopLock failed with unexpected exception") Line 380: Line 381: def desktopLogin(self, domain, user, password): -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Nir Soffer has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: (1 comment) https://gerrit.ovirt.org/#/c/47404/5//COMMIT_MSG Commit Message: Line 7: guest-agent: desktopLock exception on EBADF should be ignored Line 8: Line 9: There's no more logging of the EBADF exceptions on desktopLock, since Line 10: this is very likely to happen on a migration and in general does not Line 11: provide with any additional value. Should add also that EBADF means the socket was closed. Can you explain how the socket got closed? Looking at the guestagent code, I don't see how a socket can get become closed expect: - Calling GuestAgent.stop() - Tiny window when reconnecting after listener detected a disconnect (unlikely) The log in the bug show that the chanel listener detected that fileno 37 as closed: VM Channels Listener::INFO::2014-10-12 21:20:46,548::vmchannels::54::vds::(_handle_event) Received 0019 on fileno 37 There are no logs showing where fileno 37 came from and how it was added to the channel listener, maybe because this log is using info log level. 2 seconds later, we see 4 exceptions generated by 4 threads calling desktopLock in the same second: Thread-61::ERROR::2014-10-12 21:20:48,152::guestagent::356::vm.Vm::(desktopLock) vmId=`e846a1ac-48bf-470e-99a8-208a9a9fff49`::desktopLock failed Traceback (most recent call last): File "/usr/share/vdsm/virt/guestagent.py", line 354, in desktopLock self._forward("lock-screen") File "/usr/share/vdsm/virt/guestagent.py", line 224, in _forward self._sock.send(message) File "/usr/lib64/python2.7/socket.py", line 170, in _dummy raise error(EBADF, 'Bad file descriptor') error: [Errno 9] Bad file descriptor Thread-62::ERROR::2014-10-12 21:20:48,153::guestagent::356::vm.Vm::(desktopLock) vmId=`e846a1ac-48bf-470e-99a8-208a9a9fff49`::desktopLock failed Traceback (most recent call last): File "/usr/share/vdsm/virt/guestagent.py", line 354, in desktopLock self._forward("lock-screen") File "/usr/share/vdsm/virt/guestagent.py", line 224, in _forward self._sock.send(message) File "/usr/lib64/python2.7/socket.py", line 170, in _dummy raise error(EBADF, 'Bad file descriptor') error: [Errno 9] Bad file descriptor Thread-63::ERROR::2014-10-12 21:20:48,153::guestagent::356::vm.Vm::(desktopLock) vmId=`e846a1ac-48bf-470e-99a8-208a9a9fff49`::desktopLock failed Traceback (most recent call last): File "/usr/share/vdsm/virt/guestagent.py", line 354, in desktopLock self._forward("lock-screen") File "/usr/share/vdsm/virt/guestagent.py", line 224, in _forward self._sock.send(message) File "/usr/lib64/python2.7/socket.py", line 170, in _dummy raise error(EBADF, 'Bad file descriptor') error: [Errno 9] Bad file descriptor Thread-64::ERROR::2014-10-12 21:20:48,186::guestagent::356::vm.Vm::(desktopLock) vmId=`e846a1ac-48bf-470e-99a8-208a9a9fff49`::desktopLock failed Traceback (most recent call last): File "/usr/share/vdsm/virt/guestagent.py", line 354, in desktopLock self._forward("lock-screen") File "/usr/share/vdsm/virt/guestagent.py", line 224, in _forward self._sock.send(message) File "/usr/lib64/python2.7/socket.py", line 170, in _dummy raise error(EBADF, 'Bad file descriptor') error: [Errno 9] Bad file descriptor So this cannot be the tiny race after a disconnect. Can you explain why do we call desktopLock 4 times in the same second from 4 threads? It seem that there are other unexplained issues here, and hiding the EBADF is not fixing the root cause. Line 12: Line 13: All other exceptions are still logged, in case something unexpected Line 14: happens. Line 15: -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
gerrit-hooks has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 6: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Vinzenz Feenstra has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: (1 comment) https://gerrit.ovirt.org/#/c/47404/5//COMMIT_MSG Commit Message: Line 7: guest-agent: desktopLock exception on EBADF should be ignored Line 8: Line 9: There's no more logging of the EBADF exceptions on desktopLock, since Line 10: this is very likely to happen on a migration and in general does not Line 11: provide with any additional value. > Should add also that EBADF means the socket was closed. This is quite simple to explain - desktopLock is triggered 4 times due to 4 display disconnect events received from the lifecycle events, we have introduced already some improvement here. There is a forced timeout of 2 seconds before calling desktopLock to avoid locking the screen when migrating. These are, for at least me, all known implications. The only thing that shouldn't be logged here is the EBADF on the disconnect event. This is all less problematic than you might see it. Line 12: Line 13: All other exceptions are still logged, in case something unexpected Line 14: happens. Line 15: -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Vinzenz Feenstra has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 5: (1 comment) https://gerrit.ovirt.org/#/c/47404/5/vdsm/virt/guestagent.py File vdsm/virt/guestagent.py: Line 373: try: Line 374: self.log.debug("desktopLock called") Line 375: self._forward("lock-screen") Line 376: except Exception as e: Line 377: if isinstance(e, socket.error) and e.args[0] == errno.EBADF: > I checked guest agent code and python socket.py, and this seems correct. A because that seems to be the only affected component, I can move it into _forward, however then I am not sure if we're swallowing something what shouldn't be swallowed.I swallow the known exception as close as possible - That's it Line 378: return # Expected when not connected/closed socket Line 379: self.log.exception("desktopLock failed with unexpected exception") Line 380: Line 381: def desktopLogin(self, domain, user, password): -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
gerrit-hooks has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 7: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
gerrit-hooks has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 8: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Jenkins CI has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 8: Propagate review hook: Continuous Integration value inherited from patch 7 -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Francesco Romani has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 8: Code-Review+1 gerrit hides Nir's score, temporary changing mine (but I don't have further comments yet). -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Vinzenz Feenstra has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 8: ping? -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Nir Soffer has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 8: (1 comment) https://gerrit.ovirt.org/#/c/47404/8/vdsm/virt/guestagent.py File vdsm/virt/guestagent.py: Line 374: self.log.debug("desktopLock called") Line 375: self._forward("lock-screen") Line 376: except Exception as e: Line 377: if isinstance(e, socket.error) and e.args[0] == errno.EBADF: Line 378: return # Expected when not connected/closed socket I like to have debug log in this case, something like "Socket is not connected". It seems that we get only one event now in 7.2, so it is not going to be an issue. Line 379: self.log.exception("desktopLock failed with unexpected exception") Line 380: Line 381: def desktopLogin(self, domain, user, password): Line 382: try: -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
gerrit-hooks has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 9: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Nir Soffer has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 9: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
gerrit-hooks has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 10: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Vinzenz Feenstra has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 10: Verified+1 -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Francesco Romani has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
Nir Soffer has submitted this change and it was merged. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. guest-agent: desktopLock exception on EBADF should be ignored There's no more logging of the EBADF exceptions on desktopLock thrown when the sockets are closed, since this is very likely to happen on a migration because we are receiving multiple display disconnect events which are delayed for 2 seconds before being processed to avoid the screen to be locked in migration cases - in allows the lock not to be executed when we're already connected again (e.g. on a fast reconnect of the display) Therefore the exception on its own does not provide much value and therefore is explicitely swallowed for the desktopLock case. All other exceptions are still logged, in case something unexpected happens. Additional note on the multiple disconnect events: We have implemented and merged a fix already to reduce this to one time. However this depends on a fixed libvirt - because they had a bug that they did not report the client remote ports and therefore we couldn't make a decision whether or not the disconnect event should be handled or not - so we handle it 4 times for now. Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Backport-To: 3.6 Bug-URL: https://bugzilla.redhat.com/1151863 Signed-off-by: Vinzenz Feenstra Reviewed-on: https://gerrit.ovirt.org/47404 Reviewed-by: Nir Soffer Continuous-Integration: Jenkins CI Reviewed-by: Francesco Romani --- M vdsm/virt/guestagent.py 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Nir Soffer: Looks good to me, but someone else must approve Jenkins CI: Passed CI tests Vinzenz Feenstra: Verified Francesco Romani: Looks good to me, approved -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
gerrit-hooks has posted comments on this change. Change subject: guest-agent: desktopLock exception on EBADF should be ignored .. Patch Set 11: * Update tracker: IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/47404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd032471396a97999c2cea5c88ae04ec8ca4028 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches