Ayal Baron has posted comments on this change.
Change subject: core: disaster recovery on update connection [wip]
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStorageServerConnectionCommand.java
Line 182: restoreStateAfterUpdate(map, true);
Line 183: }
Line 184:
Line 185: /**
Line 186: * Verify LUN ID consistency in the DB - needed for disaster
recovery
This is not DR specific.
s/.*/Synchronize LUN details comprising the storage domain with the DB - in
various scenarios user may change this on storage side/
Line 187: */
Line 188: protected void ensureLunsConsistency() {
Line 189: final ArrayList<LUNs> lunsFromVgInfo = (ArrayList<LUNs>)
runVdsCommand(VDSCommandType.GetVGInfo,
Line 190: new GetVGInfoVDSCommandParameters(getVds().getId(),
getStorageDomain().getStorage())).getReturnValue();
Line 184:
Line 185: /**
Line 186: * Verify LUN ID consistency in the DB - needed for disaster
recovery
Line 187: */
Line 188: protected void ensureLunsConsistency() {
/ensureLunsConsistency/syncLunInfo/
Line 189: final ArrayList<LUNs> lunsFromVgInfo = (ArrayList<LUNs>)
runVdsCommand(VDSCommandType.GetVGInfo,
Line 190: new GetVGInfoVDSCommandParameters(getVds().getId(),
getStorageDomain().getStorage())).getReturnValue();
Line 191:
Line 192: if (lunsFromVgInfo.isEmpty()) {
Line 205: }
Line 206:
Line 207: for (LUNs lunFromVgInfo : lunsFromVgInfo) {
Line 208: for (LUNs lunFromDb : lunsFromDb) {
Line 209: if (lunFromDb.getphysical_volume_id() == null
||
this code assumes that we always have the same number of LUNs and they have the
same pvUUIDs.
The intention however is to be agnostic to this. i.e. update lun where
relevant, add lun if new, remove old lun if no longer there.
Line 210:
!lunFromDb.getphysical_volume_id().equals(lunFromVgInfo.getphysical_volume_id()))
{
Line 211: continue;
Line 212: }
Line 213:
--
To view, visit http://gerrit.ovirt.org/16533
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id0be9c598ee666df2977ffbc2526e2d3fbd997e6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches