Bug 1829830 - vhost custom properties does not accept '-'
Summary: vhost custom properties does not accept '-'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.3.7
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.4.1
: ---
Assignee: Dominik Holler
QA Contact: Polina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-30 12:51 UTC by Siddhant Rao
Modified: 2023-09-07 23:01 UTC (History)
7 users (show)

Fixed In Version: ovirt-engine-4.4.0.1
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-04 13:22:48 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5050081 0 None None None 2020-05-05 16:20:02 UTC
Red Hat Product Errata RHSA-2020:3247 0 None None None 2020-08-04 13:23:02 UTC
oVirt gerrit 108812 0 master MERGED core: Fix regex for custom property vhost 2020-11-24 13:02:46 UTC

Description Siddhant Rao 2020-04-30 12:51:34 UTC
Description of problem:
While configuring custom property vhost to disable vhost-net while creating a VM, it does not allow the addition of vhost property is the logical network name has a hyphen in it.

Version-Release number of selected component (if applicable):
rhvm-4.3.3.7-0.1.el7.noarch
ovirt-engine-4.3.3.7-0.1.el7.noarch
ovirt-engine-ui-extensions-1.0.4-1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create a logical network with name which has a hyphen(for example abcd-mgmt)
2. Try assigning this to a VM in vhost in Custom properties
   Virtual Machines --> Select VM --> Edit --> Custom properties --> vhost
   Add this :- abcd-mgmt:false
3. The UI will not accept this.

Actual results:
The Web UI will not accept a logical network with a hyphen in it.

Expected results:
The web UI should accept a logical network with a hyphen in it.

Additional info:
AFAIK there is no restriction on adding a hyphen in logical network

This issue is seen in a 4.3.3 customer environment, However I am able to reproduce this in a 4.3.7 environment.

Comment 1 Dominik Holler 2020-05-04 19:25:02 UTC
A possible way to modify the validation on a test system is like this:
1. Read the old pattern:
  /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select option_value  from vdc_options where option_name like 'PredefinedVMProperties' and version like '4.3' ;"
  should return
  sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$;mdev_type=^[^,](,?[0-9A-Za-z-]+)+$;hugepages=^[0-9]+$
2. Modify the pattern:
  /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select fn_db_update_config_value('PredefinedVMProperties', 'sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_-]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$;mdev_type=^[^,](,?[0-9A-Za-z-]+)+$;hugepages=^[0-9]+$', '4.3');"
3. systemctl restart ovirt-engine

Please note that there is no verification that this has no unintended side effects yet.

Comment 2 Marina Kalinin 2020-05-05 15:01:41 UTC
The suggestion in comment#2 helped the customer. Let's test it properly and include it in the release.
Thank you!

Comment 3 Marina Kalinin 2020-05-05 15:03:11 UTC
I would keep severity high though. It is still preventing customers from doing the deployment.

Siddhant, please create KCS.

Comment 4 Polina 2020-05-25 08:34:22 UTC
verified on ovirt-engine-4.4.0.2-0.1.el8ev.noarch

network name with hyphen is successfully accepted now as a value for vhost custom-property.
steps:
1. Create new network (networks/new network) , name test-network.  In Compute/hosts/host1/setup host/ attach the new network to the enp3s0f1. In VM add the second nic (in Edit wirtual machine.general tab).
2. Set custom property: vhost = test-network:true.
Start, migrate, stop VM succeed.

The test added to the automation regression set

Comment 7 errata-xmlrpc 2020-08-04 13:22:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: RHV Manager (ovirt-engine) 4.4 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2020:3247


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