Bug 2076053 - Console disconnect action delay field in the database is set to the type smallint while from UI and REST the field type is integer
Summary: Console disconnect action delay field in the database is set to the type smal...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.5.0.2
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ovirt-4.5.2
: ---
Assignee: Shmuel Melamud
QA Contact: Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-17 12:56 UTC by Tamir
Modified: 2022-08-30 08:47 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.5.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-30 08:47:42 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-api-model pull 49 0 None open Changed type of Display.disconnectActionDelay() to Short 2022-04-26 01:05:43 UTC
Github oVirt ovirt-engine pull 425 0 None open core: Change type of console_disconnect_action_delay to int 2022-06-09 00:33:54 UTC
Github oVirt ovirt-engine pull 480 0 None open core: Change type of console_disconnect_action_delay parameters 2022-06-21 23:13:21 UTC
Red Hat Issue Tracker RHV-45785 0 None None None 2022-04-17 13:03:12 UTC

Description Tamir 2022-04-17 12:56:30 UTC
Description of problem:

The field v_console_disconnect_action_delay in the vm_static table and in the SQL functions InsertVmTemplate, UpdateVmTemplate, InsertVmStatic, UpdateVmStatic is set to SMALLINT which its limit is 32767, while the WebAdmin and REST API define the field as an integer which it's limit is 2147483647.

The result is the issue described in the results below. 


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:
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 a VM with Console Disconnect Action set to Shutdown virtual machine and Console Disconnect Action Delay set to 32768.

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 with Console Disconnect Action Delay set to -32768 minutes.

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

Comment 1 Arik 2022-04-18 08:45:18 UTC
There's not much sense in configuring such high values - users can alternatively not set the disconnect action..
The idea is to set a reasonable timeout in minutes that when it is reached the disconnect action applies

Comment 2 Tamir 2022-06-21 10:42:54 UTC
I am changing the status back to Assigned.

I have repeated the steps I provided in the bug description.
The issue wasn't solved entirely.
The VM was created with Console Disconnect Action Delay set to -32768 minutes.

I have tested the changes in:
    - Engine instance with RHV 4.5.1-3 (ovirt-engine-4.5.1.2-0.11.el8ev) and RHEL 8.6 installed.
    - 3 hosts with RHV 4.5.1-3 and RHEL 8.6 and with vdsm-4.50.1.3-1.el8ev.

Steps to Reproduce:
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 a VM with Console Disconnect Action set to Shutdown virtual machine and Console Disconnect Action Delay set to 32768.

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 with Console Disconnect Action Delay set to -32768 minutes.

Comment 3 Arik 2022-06-21 14:43:10 UTC
Yeah, a simple grep shows that not all places were changed ("v_console_disconnect_action_delay SMALLINT")

Comment 4 Tamir 2022-07-19 13:58:51 UTC
Verified on RHV 4.5.2-1.

Env:
    - Engine instance with RHV 4.5.2-1 (ovirt-engine-4.5.2) and RHEL 8.6 installed.
    - 3 hosts with RHV 4.5.2-1 and RHEL 8.6 and with vdsm-4.50.2.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 a VM with Console Disconnect Action set to Shutdown virtual machine and Console Disconnect Action Delay set to 32768.

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 with Console Disconnect Action Delay set to 32768 minutes.

Note:

I checked and indeed the column console_disconnect_action_delay in the vm_static table and the field v_console_disconnect_action_delay in the SQL functions InsertVmTemplate, UpdateVmTemplate, InsertVmStatic, UpdateVmStatic are set to Integer.

Comment 5 Sandro Bonazzola 2022-08-30 08:47:42 UTC
This bugzilla is included in oVirt 4.5.2 release, published on August 10th 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.2 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.