Bug 1919628 - VM pool size update using the REST API fails
Summary: VM pool size update using the REST API fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.4.5.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.4.5
: ---
Assignee: Liran Rotenberg
QA Contact: Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-24 08:56 UTC by Tamir
Modified: 2021-03-18 15:14 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.4.5.3
Clone Of:
Environment:
Last Closed: 2021-03-18 15:14:08 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.4+
aoconnor: blocker+


Attachments (Terms of Use)
Added engine log and pool creation response (265.52 KB, application/zip)
2021-01-24 08:56 UTC, Tamir
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 113132 0 master MERGED api: initiate tpm to update vmpool 2021-02-21 14:06:44 UTC

Description Tamir 2021-01-24 08:56:29 UTC
Created attachment 1750212 [details]
Added engine log and pool creation response

Description of problem:
When I update a VM pool's size using the REST API, the action fails (The response HTTP error code was 400). 

Version-Release number of selected component (if applicable):
  - Engine instance with RHV 4.4.5-2 (ovirt-engine-4.4.5.2-0.1.el8ev) and RHEL 8.3 installed.
  - 3 hosts with RHV 4.4.5-2 and RHEL 8.3, 3 hosts with vdsm-4.40.50.2-1.el8ev

How reproducible:
100%

Steps to Reproduce:
1. Create a 4.5 data center and a 4.5 cluster.
2. Install the host and create a new NFS storage domain.
3. Import a RHEL 8.3 template from glance
4. Send a post request to https://{{engine_url}}/ovirt-engine/api/vmpools
(The {{engine_url}} is replaced with the real engine's URL) with the body:
<vm_pool>
    <name>VMPooll</name>
    <cluster id="349e49f4-2071-45a2-8363-0d538e9271c8" />
    <template id="3a9215b8-2440-4434-b50f-6d080f32e8b6"/>
</vm_pool>

5. Copy the vm_pool object from the response's body (The response is in the txt file "vm_pool_creation_response.txt") to a new request body and change the pool size to a larger size like 5.

6. Send a put request to https://{{engine_url}}/ovirt-engine/api/vmpools/{{VM_POOL_ID}}
(The {{engine_url}} is replaced with the real engine's URL and
the {{VM_POOL_ID}} is replaced with the pool id from the pool creation response) and set the body to the body from step 5.


Actual results:
1. The 4.5 data center and the 4.5 cluster were created.
2. The host was installed and the NFS storage domain was created.
3. The template was imported.
4. The pool was created successfully.
5. You have copied the vm_pool object from the response's body into a new request's body.
6. The response was: 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <detail>[Internal Engine Error]</detail>
    <reason>Operation Failed</reason>
</fault>

Expected results:
1-5 steps results are as expected.
6. The response HTTP code should be 200 and there shouldn't be an fault object in the response.

Additional info:

Comment 1 RHEL Program Management 2021-01-24 14:15:49 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 2 Tamir 2021-01-31 11:12:07 UTC
Verified on RHV 4.4.5-3. All looks good to me.

Env:
  - Engine instance with RHV 4.4.5-3 (ovirt-engine-4.4.5.3-0.14.el8ev) and RHEL 8.3 installed.
  - 3 hosts with RHV 4.4.5-3 and RHEL 8.3, 3 hosts with vdsm-4.40.50.3-1.el8ev

Steps:
1. Create a 4.5 data center and a 4.5 cluster.
2. Install the host and create a new NFS storage domain.
3. Import a RHEL 8.3 template from glance
4. Send a post request to https://{{engine_url}}/ovirt-engine/api/vmpools
(The {{engine_url}} is replaced with the real engine's URL) with the body:
<vm_pool>
    <name>VMPooll</name>
    <cluster id="349e49f4-2071-45a2-8363-0d538e9271c8" />
    <template id="3a9215b8-2440-4434-b50f-6d080f32e8b6"/>
</vm_pool>

5. Copy the vm_pool object from the response's body to a new request body and change the pool size to a larger size like 5.

6. Send a put request to https://{{engine_url}}/ovirt-engine/api/vmpools/{{VM_POOL_ID}}
(The {{engine_url}} is replaced with the real engine's URL and
the {{VM_POOL_ID}} is replaced with the pool id from the pool creation response) and set the body to the body from step 5.


Results (As Expected):
Actual results:
1. The 4.5 data center and the 4.5 cluster were created.
2. The host was installed and the NFS storage domain was created.
3. The template was imported.
4. The pool was created successfully.
5. I have copied the vm_pool object from the response's body into a new request's body.
6. The pool was updated to the size I specified.

Comment 3 Sandro Bonazzola 2021-03-18 15:14:08 UTC
This bugzilla is included in oVirt 4.4.5 release, published on March 18th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.5 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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