Description of problem: Since unattached SD has no storage pool validate of DiscardAfterDeleteSupportedByDcVersion throws an NPE. Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Create storage domain and don't attach it to a Data Center 2. Try to edit the Storage Domain (For example change its description) 3. Actual results: We get a general exception message in the GUI and an NPE is being thrown in the engine log Expected results: update of unattached SD should succeed Additional info:
Maor, I tried to edit the domain's (unattached domain) description and it blocked with the following message: "Error while executing action: Cannot edit Storage. Can only update the following fields: name, description, comment, wipe after delete, low space threshold, and critical space threshold." from the engine.log: 2017-01-22 21:00:53,527+02 WARN [org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand] (default task-12) [fca85241-e14c-48bb-8212-a655b3ce3642] There was an attempt to update the following fields al though they are not allowed to be updated: storageFormat 2017-01-22 21:00:53,528+02 WARN [org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand] (default task-12) [fca85241-e14c-48bb-8212-a655b3ce3642] Validation of action 'UpdateStorageDomain' failed for user admin@internal-authz. Reasons: VAR__TYPE__STORAGE__DOMAIN,VAR__ACTION__UPDATE,ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS
(In reply to Raz Tamir from comment #1) > Maor, > I tried to edit the domain's (unattached domain) description and it blocked > with the following message: > "Error while executing action: Cannot edit Storage. Can only update the > following fields: name, description, comment, wipe after delete, low space > threshold, and critical space threshold." > > from the engine.log: > 2017-01-22 21:00:53,527+02 WARN > [org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand] > (default task-12) [fca85241-e14c-48bb-8212-a655b3ce3642] There was an > attempt to update the following fields al > though they are not allowed to be updated: storageFormat > 2017-01-22 21:00:53,528+02 WARN > [org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand] > (default task-12) [fca85241-e14c-48bb-8212-a655b3ce3642] Validation of > action 'UpdateStorageDomain' failed for user admin@internal-authz. Reasons: > VAR__TYPE__STORAGE__DOMAIN,VAR__ACTION__UPDATE, > ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS You were trying to update the storageFormat as well, and update the storage format is not part of the reproduce steps. Also there was no NPE which was thrown. While you update the storage domain please check that the storage format does not change as well while the storage domain is being updated. Regarding the storageFormat update, The upgrade process manages the storage format update as an internal operation while the storage pool is being upgraded or while attaching the storage domain to a Data Center, the user never do it him self, so I think it is sounds reasonable to make it as non-editable. of course if you think otherwise you are welcome to open a separate bug and I will change the behavior as we think it will be best.
After check with Maor, the issue in comment #1 applied to SD with V1 only. I will open a separate bug. Verified on 4.1.0.2-0.2.el7