[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vdsm-patches
Subject:    Change in vdsm[master]: guest-agent: desktopLock exception on EBADF should be ignored
From:       nsoffer () redhat ! com
Date:       2015-10-29 22:30:51
Message-ID: 201510292230.t9TMUpma012036 () gerrit ! ovirt ! org
[Download RAW message or body]

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@redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer@redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr@redhat.com>
Gerrit-Reviewer: automation@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic