Bug 1379802
Summary: | VmPool creation won't honor template's quota | ||||||
---|---|---|---|---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | nicolas | ||||
Component: | Backend.Core | Assignee: | Andrej Krejcir <akrejcir> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | sefi litmanovich <slitmano> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 3.6.7 | CC: | akrejcir, bugs, juan.hernandez, nicolas | ||||
Target Milestone: | ovirt-4.0.5 | Keywords: | ZStream | ||||
Target Release: | 4.0.5.1 | Flags: | msivak:
ovirt-4.0.z?
rule-engine: planning_ack? msivak: devel_ack+ rule-engine: testing_ack+ |
||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-01-18 07:35:38 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
nicolas
2016-09-27 17:15:35 UTC
I believe that the SDK isn't the source of this problem. However, to verify that I would need to see what is the request sent by the SDK when you run that script. Can you add the "debug=True" parameter to the constructor of the API object, run the script and share the ouptut? Note that the output will contain the HTTP "Authorization" header, including your user name and password. Make sure to remove it before sharing. In addition I'd suggest to avoid setting the "cluster" and "template" parameters to the objects obtained from "api.clusters.get" and "api.templates.get", as then you will be sending to the server the complete representation of these objects, when you only need the id/name. Try to do the following instead: cluster = api.clusters.get(name='...') template = api.templates.gete(name='...') pool = params.VmPool( name='TEST', cluster=params.Cluster(id=cluster.get_id()), template=params.Template(id=template.get_id()), ... ) Created attachment 1205289 [details]
Debug log of the vmpool.add() call
Log attached.
Thanks, that confirms that the SDK isn't the cause of the problem, as it is sending the expected request. I'am moving the bug to the backend component and to the SLA team for further investigation. Just to clarify (FWIW): Our oVirt engine version is 4.0.3, but due to compatibility reasons regarding an app, our Python-SDK version is 3.6.7. Currently, REST api ignores template's quota. Hi Verified with rhevm-4.0.5.4-0.1.el7ev.noarch according the following flow: 1. Create 3 qoutas in DC - a,b,z 2. Set the qouta mode in DC to audit* 3. Edit a template in the DC and set qouta to 'z' 4. Create a vm pool from the template via API (I wasn't sure if at the end it has something to do with API or not). Result: The vm pool and all vms in it are set t qouta 'z' as expected. * Is this the correct flow? What was the qouta mode on the DC when the template was created? and when the vm pool was created? The VMpools don't have to be created via the API, the problem just happens when *moving* the disk of a VM that is part of a VMpool via the API. In any moment the quota mode has been 'audit': Both at template creation time and the VM creation time. Otherwise the flow is correct. Argh, sorry, disregard the first line in the last comment, I mixed up two BZ. The correct sentence is: As per my tests, yes, the VMpool is created via the Python SDK (thus using the API). That is when it doesn't honor the Quota. When the VMpool is created via the webadmin the Quota is respected. |