Liron Ar has posted comments on this change.
Change subject: core: avoid having LOCKED domain on a failed reconstruct.
......................................................................
Patch Set 2: (6 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java
Line 49: _newMasterStorageDomainId = parameters.getNewMasterDomainId();
Line 50: canChooseInactiveDomainAsMaster =
parameters.isCanChooseInactiveDomainAsMaster();
Line 51: }
Line 52:
Line 53: private boolean checkIsDomainLocked(StoragePoolIsoMap domain) {
I prefer to keep the name as "checkIsDomainLocked" is more of a getter name
convention
Line 54: if (StorageDomainStatus.Locked == domain.getstatus()) {
Line 55: addInvalidSDStatusMessage(StorageDomainStatus.Locked);
Line 56: return true;
Line 57: }
Line 59: return false;
Line 60: }
Line 61:
Line 62: @Override
Line 63: protected boolean canDoAction() {
Done
Line 64: if
(checkIsDomainLocked(getStorageDomain().getStoragePoolIsoMapData())) {
Line 65: return false;
Line 66: }
Line 67:
Line 61:
Line 62: @Override
Line 63: protected boolean canDoAction() {
Line 64: if
(checkIsDomainLocked(getStorageDomain().getStoragePoolIsoMapData())) {
Line 65: return false;
There will be a CDA message in the log which will give the information, i don't
think that we need to add here additional logging as it will be basically a
duplicate information.
For each command that we run the user might get CDA message and immediately the
status of the object would change as other operation ended- can you elaborate
why do u see it as different? I see it as the same as other flows.
Line 66: }
Line 67:
Line 68: List<StoragePoolIsoMap> poolDomains = DbFacade.getInstance()
Line 69:
.getStoragePoolIsoMapDao().getAllForStoragePool(getStoragePool().getId());
Line 68: List<StoragePoolIsoMap> poolDomains = DbFacade.getInstance()
Line 69:
.getStoragePoolIsoMapDao().getAllForStoragePool(getStoragePool().getId());
Line 70: for (StoragePoolIsoMap poolDomain : poolDomains) {
Line 71: if (checkIsDomainLocked(poolDomain)) {
Line 72: return false;
I don't agree about the log, the CDA message should be refactored to give that
info..but that's for another patch :)
Line 73: }
Line 74: }
Line 75:
Line 76: return initializeVds();
....................................................
Commit Message
Line 6:
Line 7: core: WIP: avoid having LOCKED domain on a failed reconstruct.
Line 8:
Line 9: When the reconstruct command is being executed during its CDA phase
Line 10: the pool domains statuses are loaded and are checked for being
different
changed to pool's domains statuses
Line 11: then LOCKED.
Line 12: getStorageDomain() is being called prior to the CDA check from
Line 13: getJobMessageProperties(), which means that possibly the loaded domain
Line 14: would be in status LOCKED.
Line 15:
Line 16: In case of using compensation through reconstruct, the domain status
Line 17: might be reverted to LOCKED instead of to it's actual status.
Line 18:
Line 19: This patch only verifies that the loaded domain withing
Done
Line 20: getStorageDomain() isn't LOCKED, a further behaviour change might be
Line 21: needed generally.
Line 22:
Line 23: Change-Id: Icf13f36f30d4cf48e8517444a33bab6359416d37
--
To view, visit http://gerrit.ovirt.org/16043
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Icf13f36f30d4cf48e8517444a33bab6359416d37
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches