Maor Lipchuk has posted comments on this change.

Change subject: core: Check if data center version supports import data domain 
upon attach
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.ovirt.org/#/c/36363/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AttachStorageDomainToPoolCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AttachStorageDomainToPoolCommand.java:

Line 232:         // ovfDisks cache list updated.
Line 233:         List<DiskImage> ovfStoreDiskImages = new 
ArrayList(getAllOVFDisks());
Line 234:         if (!ovfStoreDiskImages.isEmpty()) {
Line 235:             while (!ovfStoreDiskImages.isEmpty()) {
Line 236:                 if 
(FeatureSupported.importDataStorageDomain(getStoragePool().getcompatibility_version()))
 {
1. It should be before the while loop

2. Since this is the attach operation the correct configuration value is 
FeatureSupported.ovfStoreOnAnyDomain

Try to do as follow after line 234  'if (!ovfStoreDiskImages.isEmpty())....':

  if 
(!FeatureSupported.importDataStorageDomain(getStoragePool().getcompatibility_versi
on()){            
AuditLogDirector.log(this,AuditLogType.RETRIEVE_UNREGISTERED_ENTITIES_NOT_SUPPORTED_IN_DC_VERSION);
  return Collections.emptyList()
}
Line 237:                     Pair<DiskImage, Long> ovfDiskAndSize = 
getLatestOVFDisk(ovfStoreDiskImages);
Line 238:                     DiskImage ovfDisk = ovfDiskAndSize.getFirst();
Line 239:                     if (ovfDisk != null) {
Line 240:                         try {


http://gerrit.ovirt.org/#/c/36363/2/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
File 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties:

Line 657: VDS_LOW_SWAP=Available swap memory of host ${HostName} 
[${AvailableSwapMemory} MB] is under defined threshold [${Threshold} MB].
Line 658: UPDATE_OVF_FOR_STORAGE_POOL_FAILED=Failed to update VMs/Templates OVF 
data in Data Center ${StoragePoolName}.
Line 659: RETRIEVE_OVF_STORE_FAILED=Failed to retrieve VMs and Templates from 
the OVF disk of Storage Domain ${StorageDomainName}.
Line 660: OVF_STORE_DOES_NOT_EXISTS=The Storage Domain does not contain any 
OVF_STORE disks. Usually the Storage Domain does not contain OVF_STORE disks 
when the Storage Domain has been previously managed with a Data Center version 
lower then 3.5.
Line 661: RETRIEVE_UNREGISTERED_ENTITIES_NOT_SUPPORTED_IN_DC_VERSION=Skipping 
retrieval attempt of VMs and Templates from the OVF disk of Storage Domain 
${StorageDomainName} since it is not supported by the Data Center version.
/s/VMs and Templates/unregistered entities /s/OVF disk/OVF_STORE disk
Line 662: UPDATE_OVF_FOR_STORAGE_DOMAIN_FAILED=Failed to update VMs/Templates 
OVF data for Storage Domain ${StorageDomainName} in Data Center 
${StoragePoolName}.
Line 663: CREATE_OVF_STORE_FOR_STORAGE_DOMAIN_FAILED=Failed to create OVF store 
disk for Storage Domain ${StorageDomainName}.\n The Disk with the id ${DiskId} 
might be removed manually for automatic attempt to create new one. \n OVF 
updates won't be attempted on the created disk.
Line 664: CREATE_OVF_STORE_FOR_STORAGE_DOMAIN_INITIATE_FAILED=Failed to create 
OVF store disk for Storage Domain ${StorageDomainName}. \n OVF data won't be 
updated meanwhile for that domain.
Line 665: UPDATE_FOR_OVF_STORES_FAILED=Failed to update OVF disks ${DisksIds}, 
OVF data isn't updated on those OVF stores (Data Center ${DataCenterName}, 
Storage Domain ${StorageDomainName}).


-- 
To view, visit http://gerrit.ovirt.org/36363
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I05b6a8fe737691655dedbfbbb8d1f0ee4a592668
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: [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

Reply via email to