Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1142925

Summary: Possible to update scheduler policy with an existing policy name
Product: Red Hat Enterprise Virtualization Manager Reporter: Artyom <alukiano>
Component: ovirt-engineAssignee: Martin Sivák <msivak>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: bazulay, dfediuck, ecohen, gklein, iheim, juan.hernandez, lpeer, oramraz, rbalakri, Rhev-m-bugs, yeylon
Target Milestone: ---   
Target Release: 3.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: sla
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-19 13:11:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot none

Description Artyom 2014-09-17 15:32:59 UTC
Created attachment 938524 [details]
screenshot

Description of problem:
Via automation flow when created and after it updated scheduler policy I created many scheduler policies with the same name. Flow create and update scheduler policy to name that already exist via REST(gap between actions very small)

Version-Release number of selected component (if applicable):
rhevm-3.5.0-0.12.beta.el6ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Fast create and update scheduler policy to the name that already exist.
2.
3.

Actual results:
Flow success.

Expected results:
Flow Failed.

Additional info:
Also values in UI and database different.
select * from cluster_policies;
                  id                  |         name          | description | is_locked | is_default |            custom_properties            
--------------------------------------+-----------------------+-------------+-----------+------------+-----------------------------------------
 20d25257-b4bd-4589-92a6-c4c5c5d3fd1a | evenly_distributed    |             | t         | f          | {
                                                                                                     :   "CpuOverCommitDurationMinutes" : "2",
                                                                                                     :   "HighUtilization" : "80"
                                                                                                     : }
 5a2b0939-7d46-4b73-a469-e9c2c7fc6a53 | power_saving          |             | t         | f          | {
                                                                                                     :   "CpuOverCommitDurationMinutes" : "2",
                                                                                                     :   "HighUtilization" : "80",
                                                                                                     :   "LowUtilization" : "20"
                                                                                                     : }
 b4ed2332-a7ac-4d5f-9596-99a439cb2812 | none                  |             | t         | t          | 
 8d5d7bec-68de-4a67-b53e-0ac54686d579 | vm_evenly_distributed |             | t         | f          | {
                                                                                                     :   "HighVmCount" : "10",
                                                                                                     :   "MigrationThreshold" : "5",
                                                                                                     :   "SpmVmGrace" : "5"
                                                                                                     : }
 48d28c2f-cdd2-49eb-b9ef-3490a8237652 | test                  | test        | f         | f          | 
 8ea6b82f-13ba-44d9-b570-e826cbb66873 | test                  | test        | f         | f          | 
 a6c62d95-ecd4-4804-a859-4dea16217fc7 | test_1                | test        | f         | f          | 
 fe36c852-abc2-40cf-af79-4334e013bbe4 | test                  | test        | f         | f          | 
(8 rows)

Comment 1 Doron Fediuck 2015-04-19 13:11:35 UTC
In order to update you should specify the relevant ID-
/api/schedulingpolicies/8d5d7bec-68de-4a67-b53e-0ac54686d579

Closing for now. If there's a compelling reason why it has to be fixed
please specify and re-open.