Ori Liel has posted comments on this change. Change subject: core: Refactor FenceVdsVDSCommand return value ......................................................................
Patch Set 8: (3 comments) https://gerrit.ovirt.org/#/c/38062/8/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/pm/FenceOperationResult.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/pm/FenceOperationResult.java: Line 15: HostPowerStatus There's a tricky little point here. There are two types of status checks: agent status check and host status check. It will be clearer if you take a look at: FenceExecutor-->checkAgentStatus() and at FenceExecutor-->checkHostStatus(). The first type is when you click 'test' in the UI. This is in the context of a certain agent, and the result is *for that agent*. That's how it works at the VDSM level. The second type is status check of the host itself via the API: POST .../api/hosts/xxx/fence <action> <fence_type>status</fence_type> </action> This will result in testing the status of *all agents*, and then, considering the gathered information, decide on the status of the host. What I'm worried about here is the name: HostPowerStatus. I think that sometimes the status here ("on"/"off") will be the *agent* status, and then the name doesn't fit. https://gerrit.ovirt.org/#/c/38062/8/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/pm/HostPowerStatus.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/pm/HostPowerStatus.java: Line 7: /** See comment in one of the other files about the name of this class https://gerrit.ovirt.org/#/c/38062/8/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/FenceVdsVDSCommand.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/FenceVdsVDSCommand.java: Line 55: _result Two thoughts here, both 'nice to have' (it's also ok the way it is). 1) Since you're already cleaning up, maybe it's unnecessary to hold _result as an instance variable? 2) Perhaps fenceNode() should already return FenceOperationResult and not FenceStatusReturnForXmlRpc? -- To view, visit https://gerrit.ovirt.org/38062 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4b3ada18bb36a376c5c19327461d2daa53eedc59 Gerrit-PatchSet: 8 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Ori Liel <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
