Change in vdsm[master]: Refactoring reportError func

danken at redhat.com danken at redhat.com
Tue Jun 10 12:28:38 UTC 2014


Dan Kenigsberg has posted comments on this change.

Change subject: Refactoring reportError func
......................................................................


Patch Set 8: Code-Review-1

(1 comment)

The current semantics of the error code is a bit of a mess: most often, Engine does not handle well a case where the same error is reported back by two different verbs. That's another reason why I do not see the usefulness of a default here.

http://gerrit.ovirt.org/#/c/28482/8/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4491:             # persist the target value to make it consistent after recovery
Line 4492:             self.saveState()
Line 4493:             return {'status': doneCode}
Line 4494: 
Line 4495:     def _reportError(self, key='unavail', msg=None):
'resource unavailable'? why is that a reasonable default? would you please drop the default completely?
Line 4496:         """
Line 4497:         Convert an exception to an error status.
Line 4498:         This method should be called only within exception-handling context.
Line 4499:         """


-- 
To view, visit http://gerrit.ovirt.org/28482
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I041a662f4fe02f671a7335d7eca84704443f5bee
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Kobi Ianko <kobi at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Kobi Ianko <kobi at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list