Maor Lipchuk has posted comments on this change.

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


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/36363/1/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 226:         }
Line 227:     }
Line 228: 
Line 229:     protected List<OvfEntityData> getEntitiesFromStorageOvfDisk() {
Line 230:         if 
(FeatureSupported.importDataStorageDomain(getStoragePool().getcompatibility_version()))
 {
1. Since this is the attach operation the correct configuration value is 
FeatureSupported.ovfStoreOnAnyDomain

2. Maybe more appropriate place to put this condition is at line 236, since we 
might have Storage Domains with no OVF_STORE disks at all (for example setup 
with only 3.4 DCs) so maybe it is better to avoid this warning every time we 
attach them.

2. Instead of nested if condition, please use negative condition and simple add 
the appropriate audit log and return an empty List.
Line 231:             // Initialize a new ArrayList with all the ovfDisks in 
the specified Storage Domain,
Line 232:             // so the entities can be removed from the list every 
time we register the latest OVF disk and we can keep the
Line 233:             // ovfDisks cache list updated.
Line 234:             List<DiskImage> ovfStoreDiskImages = new 
ArrayList(getAllOVFDisks());


http://gerrit.ovirt.org/#/c/36363/1/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: 1
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-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to