Bug 2076054 - Disconnect action delay property isn't copied from template on VMPool creation via RestAPI
Summary: Disconnect action delay property isn't copied from template on VMPool creatio...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.5.0.2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ovirt-4.5.1
: ---
Assignee: Arik
QA Contact: Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-17 13:50 UTC by Tamir
Modified: 2022-06-23 05:54 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.5.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-23 05:54:58 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.5?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-engine pull 287 0 None open Map console disconnect action delay in VmMapper 2022-04-18 17:27:52 UTC
Red Hat Issue Tracker RHV-45786 0 None None None 2022-04-17 13:56:43 UTC

Description Tamir 2022-04-17 13:50:56 UTC
Description of problem:

On VMPool creation from the REST API, the disconnect_action_delay property isn't copied from the template.

The request was a POST request to the URL https://{{base_url}}/ovirt-engine/api/vmpools with the body:

<vm_pool>
    <name>VMPoolShutdown</name>
    <cluster>
        <name>golden_env_mixed_1</name>
    </cluster>
    <template>
        <name>shutdown_template</name>
    </template>
    <size>2</size>
</vm_pool>


Version-Release number of selected component (if applicable):
    - Engine instance with RHV 4.5.0-6 (ovirt-engine-4.5.0.2-0.7.el8ev) and RHEL 8.6 installed.
    - 3 hosts with RHV 4.5.0-6 and RHEL 8.6 and with vdsm-4.50.0.12-1.el8ev.

How reproducible:
100%

Steps to Reproduce:

From WebAdmin:

1. Create a 4.7 data center and a 4.7 cluster.
2. Install the hosts and create a new NFS storage domain.
3. Create an RHEL VM.
4. Create a template from the VM with Console Disconnect Action set to Shutdown virtual machine and Disconnect Action Delay in Minutes set to 2.

From the REST API:

5. Create a VM Pool from the template using the below POST request to the URL https://{{base_url}}/ovirt-engine/api/vmpools with the body:

<vm_pool>
    <name>VMPoolShutdown</name>
    <cluster>
        <name>golden_env_mixed_1</name>
    </cluster>
    <template>
        <name>shutdown_template</name>
    </template>
    <size>2</size>
</vm_pool>

Actual results:
1. The 4.7 data center and the 4.7 cluster were created.
2. The hosts were installed and the NFS storage domain was created.
3. The VM was created.
4. The template was created with Console Disconnect Action Delay set to 2 minutes.
5. The VM pool was created with:
            <disconnect_action>SHUTDOWN</disconnect_action>
            <disconnect_action_delay>0</disconnect_action_delay>

Expected results:
Steps 1-4 results are as expected. 
In step 5, the Console Disconnect Action Delay property should have been set to 2 minutes.

Comment 1 Tamir 2022-06-07 15:26:25 UTC
Verified on RHV 4.5.1-1.

Env:
    - Engine instance with RHV 4.5.1-1 (ovirt-engine-4.5.1-0.62.el8ev) and RHEL 8.6 installed.
    - 2 hosts with RHV 4.5.1-1 and RHEL 8.6 and with vdsm-4.50.1.1-1.el8ev.

Steps:

From WebAdmin:

1. Create a 4.7 data center and a 4.7 cluster.
2. Install the hosts and create a new NFS storage domain.
3. Create an RHEL VM.
4. Create a template from the VM with Console Disconnect Action set to Shutdown virtual machine and Disconnect Action Delay in Minutes set to 2.

From the REST API:

5. Create a VM Pool from the template using the below POST request to the URL https://{{base_url}}/ovirt-engine/api/vmpools with the body:

<vm_pool>
    <name>VMPoolShutdown</name>
    <cluster>
        <name>golden_env_mixed_1</name>
    </cluster>
    <template>
        <name>shutdown_template</name>
    </template>
    <size>2</size>
</vm_pool>

Results (As Expected):
1. The 4.7 data center and the 4.7 cluster were created.
2. The hosts were installed and the NFS storage domain was created.
3. The VM was created.
4. The template was created with Console Disconnect Action Delay set to 2 minutes.
5. The VM pool was created with:
            <disconnect_action>SHUTDOWN</disconnect_action>
            <disconnect_action_delay>2</disconnect_action_delay>

   Also, the created VMs are set with:
            <disconnect_action>SHUTDOWN</disconnect_action>
            <disconnect_action_delay>2</disconnect_action_delay>

Comment 2 Sandro Bonazzola 2022-06-23 05:54:58 UTC
This bugzilla is included in oVirt 4.5.1 release, published on June 22nd 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.1 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.