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.
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.
The suggestion in comment#2 helped the customer. Let's test it properly and include it in the release. Thank you!
I would keep severity high though. It is still preventing customers from doing the deployment. Siddhant, please create KCS.
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
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