Allon Mureinik has posted comments on this change. Change subject: core: prevent maintenance when domain is sill in use ......................................................................
Patch Set 5: (4 comments) http://gerrit.ovirt.org/#/c/22045/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommand.java: Line 108: return failCanDoAction(VdcBllMessages.ERROR_CANNOT_DEACTIVATE_MASTER_WITH_NON_DATA_DOMAINS); Line 109: } Line 110: Line 111: if (!filterDomainsByStatus(domains, StorageDomainStatus.Locked).isEmpty() Line 112: || !filterDomainsByStatus(domains, StorageDomainStatus.MovingToMaintenance).isEmpty()) { > Does this message still relevant here? Its name indicates that we are talki Not sure this check is correct. >From what I can gather, it seems that if you deactivate a domain already in >maintenance it's just silently ignored. Shouldn't the same be true for >MovingToMaintenance? Line 113: return failCanDoAction(VdcBllMessages.ERROR_CANNOT_DEACTIVATE_MASTER_WITH_LOCKED_DOMAINS); Line 114: } Line 115: } Line 116: if (!getParameters().getIsInternal() http://gerrit.ovirt.org/#/c/22045/5/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageDomainStatus.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageDomainStatus.java: Line 18: return values()[value]; Line 19: } Line 20: Line 21: public boolean isLocked() { Line 22: return this == Locked || this == MovingToMaintenance; why is this considered locked? Line 23: } http://gerrit.ovirt.org/#/c/22045/5/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/DomainVisibility.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/DomainVisibility.java: Line 9: Line 10: Line 11: public class DomainVisibility { Line 12: Line 13: public enum Status { should be static Line 14: VISIBLE, Line 15: UNREPORTED, Line 16: UNREACHABLE, Line 17: } Line 15: UNREPORTED, Line 16: UNREACHABLE, Line 17: } Line 18: Line 19: private Map<Guid, Map<Guid, Status>> domainsVisibility; We should really extract this to a helper class, like the existing MutiValueMapUtils - not sure I'd do this now, though. Line 20: Line 21: public DomainVisibility() { Line 22: this.domainsVisibility = new HashMap<>(); Line 23: } -- To view, visit http://gerrit.ovirt.org/22045 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I55cd5aa6a6dc32f374a4bb21b159d3cb30da65f5 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Ayal Baron <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Liron Ar <[email protected]> Gerrit-Reviewer: Sergey Gotliv <[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
