Maor Lipchuk has posted comments on this change. Change subject: core: Remove unexisting Storage Domain will be roll forward. ......................................................................
Patch Set 3: (9 comments) .................................................... Commit Message Line 3: AuthorDate: 2013-10-14 16:13:15 +0300 Line 4: Commit: Maor Lipchuk <[email protected]> Line 5: CommitDate: 2013-10-14 17:47:56 +0300 Line 6: Line 7: core: Remove unexisting Storage Domain will be roll forward. done Line 8: Line 9: Remove of a Storage Domain which no longer exists causes a failure in Line 10: the engine and block the user from removing the storage. Line 11: Line 5: CommitDate: 2013-10-14 17:47:56 +0300 Line 6: Line 7: core: Remove unexisting Storage Domain will be roll forward. Line 8: Line 9: Remove of a Storage Domain which no longer exists causes a failure in done Line 10: the engine and block the user from removing the storage. Line 11: Line 12: The following patch validate if the storage domain was not removed due Line 13: to the reason of non existence, and if so it will roll-forward and deletes Line 6: Line 7: core: Remove unexisting Storage Domain will be roll forward. Line 8: Line 9: Remove of a Storage Domain which no longer exists causes a failure in Line 10: the engine and block the user from removing the storage. done Line 11: Line 12: The following patch validate if the storage domain was not removed due Line 13: to the reason of non existence, and if so it will roll-forward and deletes Line 14: it any how. Line 8: Line 9: Remove of a Storage Domain which no longer exists causes a failure in Line 10: the engine and block the user from removing the storage. Line 11: Line 12: The following patch validate if the storage domain was not removed due done Line 13: to the reason of non existence, and if so it will roll-forward and deletes Line 14: it any how. Line 15: Line 16: Change-Id: I9515a5ddfcaa965c2bad1883f0543494915b8c7d Line 9: Remove of a Storage Domain which no longer exists causes a failure in Line 10: the engine and block the user from removing the storage. Line 11: Line 12: The following patch validate if the storage domain was not removed due Line 13: to the reason of non existence, and if so it will roll-forward and deletes done Line 14: it any how. Line 15: Line 16: Change-Id: I9515a5ddfcaa965c2bad1883f0543494915b8c7d Line 17: Bug-Url: https://bugzilla.redhat.com/1001626 .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainCommand.java Line 184: DetachStorageDomainFromPoolParameters params = new DetachStorageDomainFromPoolParameters(domId, poolId); Line 185: params.setDestroyingPool(getParameters().getDestroyingPool()); Line 186: Line 187: return getBackend() Line 188: .runInternalAction(VdcActionType.DetachStorageDomainFromPool, I'm quite sure we can not get it here, but this is not relevant to the fix Line 189: params).getSucceeded(); Line 190: } Line 191: Line 192: protected boolean formatStorage(StorageDomain dom, VDS vds) { Line 194: return getVdsBroker() Line 195: .RunVdsCommand(VDSCommandType.FormatStorageDomain, Line 196: new FormatStorageDomainVDSCommandParameters(vds.getId(), dom.getId())).getSucceeded(); Line 197: } catch (VdcBLLException e) { Line 198: if (e.getVdsError().getCode() != VdcBllErrors.StorageDomainDoesNotExist) { 1. done 2. I prefer it that way, it is more efficient Line 199: throw e; Line 200: } Line 201: log.warnFormat("Storage Domain {0} which was about to be formatted was not exists in VDS id {1}", Line 202: vds.getId(), Line 197: } catch (VdcBLLException e) { Line 198: if (e.getVdsError().getCode() != VdcBllErrors.StorageDomainDoesNotExist) { Line 199: throw e; Line 200: } Line 201: log.warnFormat("Storage Domain {0} which was about to be formatted was not exists in VDS id {1}", well, it is only the log so I don't think it is that relevant, but change it as suggested Line 202: vds.getId(), Line 203: dom.getId()); Line 204: return true; Line 205: } Line 199: throw e; Line 200: } Line 201: log.warnFormat("Storage Domain {0} which was about to be formatted was not exists in VDS id {1}", Line 202: vds.getId(), Line 203: dom.getId()); 1. done 2. done Line 204: return true; Line 205: } Line 206: } Line 207: -- To view, visit http://gerrit.ovirt.org/20158 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9515a5ddfcaa965c2bad1883f0543494915b8c7d Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Liron Ar <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Sergey Gotliv <[email protected]> Gerrit-Reviewer: Tal Nisan <[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
