| Summary: | Change cluster scheduling policy to user scheduling policy action failed | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Artyom <alukiano> |
| Component: | RestAPI | Assignee: | Juan Hernández <juan.hernandez> |
| Status: | CLOSED NOTABUG | QA Contact: | Artyom <alukiano> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.1.0 | CC: | alukiano, bugs, dchaplyg, dfediuck, mavital, mgoldboi, msivak |
| Target Milestone: | ovirt-4.1.0-beta | Keywords: | Automation, Regression |
| Target Release: | --- | Flags: | mgoldboi:
ovirt-4.1?
mgoldboi: blocker? mgoldboi: planning_ack+ mgoldboi: devel_ack? mgoldboi: testing_ack? |
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-12-11 11:34:11 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: | |
Artyom, can you show us how the user scheduling policy looks like after creation? <scheduling_policy href="/ovirt-engine/api/schedulingpolicies/f67ec269-c339-4280-b420-d96cdf2f047c" id="f67ec269-c339-4280-b420-d96cdf2f047c"> <name>test_policy</name> <link href="/ovirt-engine/api/schedulingpolicies/f67ec269-c339-4280-b420-d96cdf2f047c/filters" rel="filters" /> <link href="/ovirt-engine/api/schedulingpolicies/f67ec269-c339-4280-b420-d96cdf2f047c/weights" rel="weights" /> <link href="/ovirt-engine/api/schedulingpolicies/f67ec269-c339-4280-b420-d96cdf2f047c/balances" rel="balances" /> <default_policy>false</default_policy> <locked>false</locked> </scheduling_policy> Well the error message tells you that there are required properties you have to set first. And there are indeed no default values for those. Does it work when you define the properties first (either on the created policy or on the cluster)?
Check one of the default policies to get an example:
<scheduling_policy href="/ovirt-engine/api/schedulingpolicies/5a2b0939-7d46-4b73-a469-e9c2c7fc6a53" id="5a2b0939-7d46-4b73-a469-e9c2c7fc6a53">
<name>power_saving</name>
<link href="/ovirt-engine/api/schedulingpolicies/5a2b0939-7d46-4b73-a469-e9c2c7fc6a53/filters" rel="filters"/>
<link href="/ovirt-engine/api/schedulingpolicies/5a2b0939-7d46-4b73-a469-e9c2c7fc6a53/weights" rel="weights"/>
<link href="/ovirt-engine/api/schedulingpolicies/5a2b0939-7d46-4b73-a469-e9c2c7fc6a53/balances" rel="balances"/>
<default_policy>false</default_policy>
<locked>true</locked>
<properties>
<property>
<name>HighUtilization</name>
<value>80</value>
</property>
<property>
<name>CpuOverCommitDurationMinutes</name>
<value>2</value>
</property>
</properties>
</scheduling_policy>
Why do we have this required properties on the policy that does not need them? Artyom, there is something in the policy that obviously needs those. Can you list the attached filters, weights and balances too? Well, unfortunately i'm not able to reproduce it. What i did:
1) POST /ovirt-engine/api/schedulingpolicies
<scheduling_policy>
<name>test_policy</name>
</scheduling_policy>
2)Checked, that policy were actually created:
GET /ovirt-engine/api/schedulingpolicies
<scheduling_policy href="/ovirt-engine/api/schedulingpolicies/b27b4898-c175-4679-a80a-9c1856b73539" id="b27b4898-c175-4679-a80a-9c1856b73539">
<name>test_policy</name>
<link href="/ovirt-engine/api/schedulingpolicies/b27b4898-c175-4679-a80a-9c1856b73539/filters" rel="filters"/>
<link href="/ovirt-engine/api/schedulingpolicies/b27b4898-c175-4679-a80a-9c1856b73539/weights" rel="weights"/>
<link href="/ovirt-engine/api/schedulingpolicies/b27b4898-c175-4679-a80a-9c1856b73539/balances" rel="balances"/>
<default_policy>false</default_policy>
<locked>false</locked>
</scheduling_policy>
3)Assigned that policy to my cluster:
PUT /ovirt-engine/api/clusters/58343ea9-02ed-023a-0391-00000000020b
<cluster>
<scheduling_policy id="b27b4898-c175-4679-a80a-9c1856b73539"/>
</cluster>
4)Checked, that policy were applied correctly:
GET /ovirt-engine/api/clusters
.....
<scheduling_policy href="/ovirt-engine/api/schedulingpolicies/b27b4898-c175-4679-a80a-9c1856b73539" id="b27b4898-c175-4679-a80a-9c1856b73539"/>
</cluster>
</clusters>
So, it successfully applied without any error message.
As an additional step, i checked contents of my new policy: filters, weights and balances. All three lists were empty. Artyom, could you please check those lists on your side?
In my case filters, weights and balances do not have any entities too. So maybe you have the version where the bug somehow fixed. Can you please attach your engine version? I checked it on the last engine ovirt-engine-4.1.0-0.2.master.20161211071204.git26a385e.el7.centos.noarch And all works fines, so you can close the bug. |
Description of problem: Change cluster scheduling policy to user scheduling policy action failed Version-Release number of selected component (if applicable): ovirt-engine-4.1.0-0.2.master.20161206091320.git94e2a8d.el7.centos.noarch How reproducible: Always Steps to Reproduce: 1. Create new scheduling policy via REST API <scheduling_policy> <name>test_policy</name> </scheduling_policy> 2. Assign the scheduler policy to the cluster <cluster> <scheduling_policy id="new_policy_id"/> </cluster> 3. Actual results: <fault> <detail>[Cannot edit Cluster if some of the specified custom properties are not configured by the system. The keys are: CpuOverCommitDurationMinutes,HighUtilization]</detail> <reason>Operation Failed</reason> </fault> Expected results: Action succeeds without any errors Additional info: I believe it connect to redundant scheduling parameters that we have under none and other built-in policies(for example "none" policy has CpuOverCommitDurationMinutes,HighUtilization parameters) Via UI all works fine