Description of problem: During automated testing we change a vmPool's name. This option is supposed to be blocked and it is blocked on UI. Furthermore another small thing which I find strange is a difference between the results of the same update with a slightly different body message: say my template's name is 'test' 1. if I try the name like this: HEADERS: "Content-Type: application/xml" "Accept: application/x-virt-viewer" PUT https://{engine_ip}/ovirt-engine/api/vmpools/{vm_pool_id}/ body: <vmpool href= "/ovirt-engine/api/vmpools/{vm_pool_id}" id="{vm_pool_id}"> <actions> <link href= "/ovirt-engine/api/vmpools/{vm_pool_id}/allocatevm" rel="allocatevm"/> </actions> <name>test-sefi</name> <description/> <link href= "/ovirt-engine/api/vmpools/{vm_pool_id}/permissions" rel="permissions"/> <size>3</size> <cluster href= "/ovirt-engine/api/clusters/{cluster_id}" id="{cluster_id}"/> <template href= "/ovirt-engine/api/templates/{template_id}" id="{template_id}"/> <prestarted_vms>0</prestarted_vms> <max_user_vms>1</max_user_vms> </vmpool> the name of the pool changes to 'test-sefi' as opposed to expected behaviour. 2. if I chang the body message so it doesn't include the cluster_id and template_id, like so: body: <vmpool href= "/ovirt-engine/api/vmpools/{vm_pool_id}" id="{vm_pool_id}"> <actions> <link href= "/ovirt-engine/api/vmpools/{vm_pool_id}/allocatevm" rel="allocatevm"/> </actions> <name>test-sefi</name> <description/> <link href= "/ovirt-engine/api/vmpools/{vm_pool_id}/permissions" rel="permissions"/> <size>3</size> <prestarted_vms>0</prestarted_vms> <max_user_vms>1</max_user_vms> </vmpool> I get status code 404: <fault> <reason>Operation Failed</reason> <detail>Entity not found: Vms: pool=test-sefi</detail> </fault> Version-Release number of selected component (if applicable): rhevm-3.6.0-0.12.master.el6 How reproducible: always Steps to Reproduce: 1. Create pool with name 'test'. 2. try to change name as mentioned above (1) Actual results: Name of the vmPool changes. Expected results: operation should fail with informative message explaining that vmPool name cannot be changed. Additional info:
When a the template isn't given as part of the request the RESTAPI has to find it, and in order to do so it has to locate the VM data of the pool. To do this it uses the name of the pool. If the name of the pool is modified in the same requests the RESTAPI uses the new name instead of the old one. This needs to be fixed: restapi: Locate VM data using pool id, not name https://gerrit.ovirt.org/45289
I think that the issue described in the previous comment should be fixed in 3.6, consider re-targeting the bug. Making the name editable or not is outside of the scope of the RESTAPI.
ok, i am splitting this bug to 2: this bug will focus on failure to update vm-pool while changing the name without setting the template. - target to 3.6 and a new bug to focus on disable changing vm-pool name, on the backend for 4.0
Verified with rhevm-3.6.0-0.16.master.el6.noarch according to the description. Verification refers to changing pool name without setting the template. As for the second bz omer mentioned, was it opened?
yes, bug 1256713 (also you can see it in the 'clones' fields above)