Bug 1408577 - Update vm pool via REST API fails because vm.vmStatic.maxMemorySizeMb is None
Summary: Update vm pool via REST API fails because vm.vmStatic.maxMemorySizeMb is None
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.0-beta
: 4.1.0.2
Assignee: Arik
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-25 09:18 UTC by sefi litmanovich
Modified: 2017-02-01 14:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:43:10 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: blocker+
rule-engine: planning_ack+
ahadas: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1406304 0 unspecified CLOSED V2V import fails on vm entity validation because vm.vmStatic.maxMemorySizeMb is None 2021-02-22 00:41:40 UTC
oVirt gerrit 69243 0 'None' 'MERGED' 'rest-api: take max memory from template' 2019-11-20 12:31:16 UTC
oVirt gerrit 69245 0 'None' 'MERGED' 'rest-api: take max memory from template' 2019-11-20 12:31:16 UTC

Internal Links: 1406304

Description sefi litmanovich 2016-12-25 09:18:29 UTC
Description of problem:
This bug is probably caused by the same reason for this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1406304
https://gerrit.ovirt.org/#/c/67747/

When trying to update a vm pool via API with any value, action will fail with:

<fault>
<detail>
[must be greater than or equal to 1, Attribute: vmStaticData.maxMemorySizeMb]
</detail>
<reason>Operation Failed</reason>
</fault>


Version-Release number of selected component (if applicable):
ovirt-engine-4.1.0-0.2.master.20161218144454.gitbaa2853.el7.centos.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create a vm pool with size = 1.
2. Try to update the vm pool's size to 2 via api:

<vm_pool>
<size>2</size>
</vm_pool>

3. Try to update number of prestarted vms in the pool via api:

<vm_pool>
<prestarted_vms>0</prestarted_vms>
</vm_pool>

4. Try to update the description of the vm pool via api:

<vm_pool>
<description>something</description>
</vm_pool>


Actual results:
In all cases the update fails with the same error message mentioned above.

Expected results:
Update succeeds.

Additional info:
Not much information in engine.log:

2016-12-25 11:11:35,848+02 WARN  [org.ovirt.engine.core.bll.UpdateVmPoolCommand] (default task-11) [8c5437ac-d8b7-41e3-8c53-fc7e5c54b223] Validation of action 'UpdateVmPool' failed for user admin@internal-authz. Reasons: VAR__TYPE__DESKTO
P_POOL,VAR__ACTION__UPDATE,must be greater than or equal to 1,$groups [Ljava.lang.Class;@4a08d46b,$message {javax.validation.constraints.Min.message},$payload [Ljava.lang.Class;@729cab2e,$value 1,ACTION_TYPE_FAILED_ATTRIBUTE_PATH,$path vm
StaticData.maxMemorySizeMb
2016-12-25 11:11:35,874+02 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-11) [] Operation Failed: [must be greater than or equal to 1, Attribute: vmStaticData.maxMemorySizeMb]

Comment 1 Yaniv Kaul 2016-12-26 08:34:14 UTC
Sefi - if the bug is due to above issue and the patch is already merged into master - you can easily validate it and see if this bug is still relevant, no?

Comment 2 sefi litmanovich 2016-12-26 09:33:29 UTC
Tried it again in ovirt-engine-4.1.0-0.3.beta2.el7.noarch, still happening. So maybe the fix didn't make it to that build yet.
I understand it's the same issue as the bug I mentioned, but this is another 'symptom' so I figured it's better to document, but if this bug isn't needed we can close as duplicate or something.
In any case, it's still exist on this build.

Comment 3 sefi litmanovich 2016-12-26 09:36:05 UTC
(In reply to sefi litmanovich from comment #2)
> Tried it again in ovirt-engine-4.1.0-0.3.beta2.el7.noarch, still happening.
> So maybe the fix didn't make it to that build yet.
> I understand it's the same issue as the bug I mentioned, but this is another
> 'symptom' so I figured it's better to document, but if this bug isn't needed
> we can close as duplicate or something.
> In any case, it's still exist on this build.

Correction - looking at the patch on the the other bug, I see the fix was specific to import flow.
So in fact the symptom in this bug won't be fixed on that patch.
I also guess that there probably other bugs touching this maxMemorySizeMb value.

Comment 4 Red Hat Bugzilla Rules Engine 2017-01-02 21:04:50 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 5 sefi litmanovich 2017-01-16 17:03:18 UTC
Verified with ovirt-4.1.0-0.4.master.20170116141310.gita30debd.el7.centos according to description.


Note You need to log in before you can comment on or make changes to this bug.