Liron Ar has posted comments on this change.
Change subject: core: Prevent usage of shareable disks on Gluster domains
......................................................................
Patch Set 7: Code-Review+1
(4 comments)
minor things, looks good otherwise..no critical issue, +1.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
Line 234: .getcompatibility_version()
Line 235: .getValue())) {
Line 236: return
failCanDoAction(VdcBllMessages.ACTION_NOT_SUPPORTED_FOR_CLUSTER_POOL_LEVEL);
Line 237: }
Line 238:
Optional: sorry for missing that, i'd move the check here..to conform with
future version where we will won't have pool type.
Line 239: if (!isVolumeFormatSupportedForShareable(((DiskImage)
getNewDisk()).getVolumeFormat())) {
Line 240: return
failCanDoAction(VdcBllMessages.SHAREABLE_DISK_IS_NOT_SUPPORTED_BY_VOLUME_FORMAT);
Line 241: }
Line 242: } else if (isUpdatedToNonShareable(getOldDisk(),
getNewDisk())) {
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmDiskCommandTest.java
Line 364: doReturn(true).when(command).acquireLockInternal();
Line 365: doReturn(snapshotDao).when(command).getSnapshotDao();
Line 366: doReturn(diskImageDao).when(command).getDiskImageDao();
Line 367: doReturn(storagePoolDao).when(command).getStoragePoolDAO();
Line 368:
doReturn(storageDomainDao).when(command).getStorageDomainDAO();
shouldn't it be storage domain static dao now?
Line 369: doReturn(vmStaticDAO).when(command).getVmStaticDAO();
Line 370: doReturn(baseDiskDao).when(command).getBaseDiskDao();
Line 371: doReturn(imageDao).when(command).getImageDao();
Line 372: doReturn(vmDeviceDAO).when(command).getVmDeviceDao();
Line 513: private StorageDomain addNewStorageDomainToDisk(DiskImage
diskImage, StorageType storageType) {
Line 514: StorageDomain storage = new StorageDomain();
Line 515: storage.setId(Guid.newGuid());
Line 516: storage.setStorageType(storageType);
Line 517: diskImage.setStorageIds(new
ArrayList<Guid>(Arrays.asList(storage.getId())));
this is unneeded..just add it to the arraylist.
Line 518: return storage;
Line 519: }
Line 520:
Line 521: private VmDevice createVmDevice(Guid diskId, Guid vmId) {
....................................................
File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
Line 144: ACTION_TYPE_FAILED_VM_DISK_SNAPSHOT_IS_PLUGGED_TO_ANOTHER_VM=Cannot
${action} ${type}. The following VM's disks snapshots are plugged to other VMs:
${disksInfo} Please deactivate/detach them from those VMs and try again.
Line 145: ACTION_TYPE_FAILED_VM_HAS_PLUGGED_DISK_SNAPSHOT=Cannot ${action}
${type}. The following VM's activated disks are disk snapshots:\n\
Line 146: ${disksInfo}. \n\
Line 147: Please deactivate them and try again.
Line 148:
ACTION_TYPE_FAILED_SHAREABLE_DISKS_NOT_SUPPORTED_ON_GLUSTER_DOMAIN=Cannot
${action} ${type}. Shareable disks are not supported on Gluster domains.
/domain/Storage Domain
Line 149: ACTION_TYPE_FAILED_DISKS_LOCKED=Cannot ${action} ${type}: The
following disks are locked: ${diskAliases}. Please try again in a few minutes.
Line 150: ACTION_TYPE_FAILED_DISKS_ILLEGAL=Cannot ${action} ${type}. The
following attached disks are in ILLEGAL status: ${diskAliases} - please remove
them and try again.
Line 151: ACTION_TYPE_FAILED_MOVE_DISKS_MIXED_PLUGGED_STATUS=Cannot ${action}
${type}. The following disks could not be moved: ${diskAliases}. Please make
sure that all disks are active or inactive in the VM.
Line 152: ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST=Cannot ${action}
${type}. The following disks already exist: ${diskAliases}. Please import as a
clone.
--
To view, visit http://gerrit.ovirt.org/21585
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6d741c93d32fa568c1d1f10429cb325a9b01c359
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Cheryn Tan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[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