Created attachment 607050 [details] ## Logs vdsm, rhevm, screen-shots Description of problem: Unable to rename storage domain name Version-Release number of selected component (if applicable): Verified on RHEVM 3.1 - SI15 RHEVM: rhevm-3.1.0-13.el6ev.noarch VDSM: vdsm-4.9.6-29.0.el6_3.x86_64 LIBVIRT: libvirt-0.9.10-21.el6.x86_64 QEMU & KVM: qemu-kvm-rhev-0.12.1.2-2.298.el6_3.x86_64 SANLOCK: sanlock-2.3-3.el6_3.x86_64 How reproducible: 100 % Steps to Reproduce: 1. Edit storage domain 2. Rename storage domain name Actual results: Failed rename storage domain Get an error: “Cannot edit Storage. Only Storage Domain name is updateable. Expected results: Succeed rename storage domain Additional info: Reproducible with iSCSI and NFS storage domain. Rhevm log: 2012-08-26 11:33:13,714 WARN [org.ovirt.engine.core.bll.storage.UpdateStorageDomainCommand] (ajp-/127.0.0.1:8009-10) [368d3694] CanDoAction of action UpdateStorageDomain failed. Reasons:VAR__ACTION__UPDATE,VAR__TYPE__STORAGE__DOMAIN,ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS
The flow to reproduce the bug is incomplete - in some scenarios this edit can work, see below. Steps to reproduce: 1. Create a DC with two active SDs. 2. set the master to maintenance - both SDs will go down 3. Activate the SD that was not the master - it will force a reconstructions of the master metadata on this domain. 4. Try to edit the name of the SD from (3) - the error will appear. In UpdateStorageDomainCommand, line 39, there is a check that only the name is changed. This fails since the UI creates a new storage_domains object without the lastTimeUsedAsMaster property (defaults to 0), and the database version has it.
Merged upstream at commit #2abf376438ef81aeb4362a41ad4a512f7c29b32e
Change-Id for that commit, for easier tracking: I77de69fb8bd28a3c2c1ec1a9be576cb7b4e9dd69
change merged.
verified on SI17. managed to rename storage domain and extend lun.