Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored

nsoffer at redhat.com nsoffer at redhat.com
Thu Oct 29 22:30:51 UTC 2015


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 <vfeenstr at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list