Maor Lipchuk has posted comments on this change. Change subject: core: connect to sp when needed before "fencing" ......................................................................
Patch Set 1: Code-Review+1 (6 comments) minor suggestions http://gerrit.ovirt.org/#/c/27306/1//COMMIT_MSG Commit Message: Line 7: core: connect to sp when needed before "fencing" Line 8: Line 9: FenceVdsManualyCommand is being executed in order to mark that a new Line 10: spm can be started. The command executes the fenceSpmStorage verb using one Line 11: of the hsm's in the the pool to mark that in the pool metadata /s/hsm's/HSMs Line 12: (current implementation), if the host isn't connected to the pool the operation Line 13: would fail. Line 14: Line 15: If the spm status results indicates that the host isn't connected to the Line 11: of the hsm's in the the pool to mark that in the pool metadata Line 12: (current implementation), if the host isn't connected to the pool the operation Line 13: would fail. Line 14: Line 15: If the spm status results indicates that the host isn't connected to the /s/results indicates/"result, indicates" or "results indicate" Line 16: pool, it should be connected before executing fenceSpmStorage in order Line 17: to not fail. If the host failed to connect to the pool, there's no point Line 18: in executing fenceSpmStorage with it's current implementation. Line 19: Line 14: Line 15: If the spm status results indicates that the host isn't connected to the Line 16: pool, it should be connected before executing fenceSpmStorage in order Line 17: to not fail. If the host failed to connect to the pool, there's no point Line 18: in executing fenceSpmStorage with it's current implementation. /s/it's/its Line 19: Line 20: Change-Id: I2770dd95a03afccd02174dadf902f443a0a66a49 http://gerrit.ovirt.org/#/c/27306/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/FenceVdsManualyCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/FenceVdsManualyCommand.java: Line 194: .RunVdsCommand(VDSCommandType.SpmStatus, Line 195: new SpmStatusVDSCommandParameters(vds.getId(), getStoragePool().getId())) Line 196: .getReturnValue(); Line 197: if (statusResult.getSpmStatus() == SpmStatus.Unknown_Pool) { Line 198: log.infoFormat("vds {0} - {1} isn't connected to the storage pool, attempting to connect in order to perform the operation", Maybe it's better to indicate the status of the spm Status (Unknown_Pool), so it will be easier to analize this in the log Line 199: vds.getName(), Line 200: vds.getId()); Line 201: VDSError error = null; Line 202: Line 208: getStoragePool().getId(), Line 209: vds.getVdsSpmId(), Line 210: masterDomain.getId(), Line 211: getStoragePool().getmaster_domain_version())); Line 212: if (!vdsReturnValue.getSucceeded()) { IINM an exception will always be thrown when ConnectStoragePool will fail Line 213: error = vdsReturnValue.getVdsError(); Line 214: } Line 215: } catch (VdcBLLException e) { Line 216: error = e.getVdsError(); Line 217: } Line 218: Line 219: if (error != null) { Line 220: log.infoFormat("Failed to connect host {0} to the storage pool with error code {1} (message {2}), " + Line 221: "trying using the next host (if available)", Maybe it's worth to mention here that we will use the next host with Unknown_Pool status Line 222: vds.getName(), Line 223: error.getCode(), Line 224: error.getMessage()); Line 225: continue; -- To view, visit http://gerrit.ovirt.org/27306 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2770dd95a03afccd02174dadf902f443a0a66a49 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Tal Nisan <[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
