Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1743562

Summary: Custom property of vNIC profile does not allow multiple security group ids
Product: [oVirt] ovirt-engine Reporter: Andrej Cernek <acernek>
Component: BLL.NetworkAssignee: Andrej Cernek <acernek>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: low Docs Contact:
Priority: low    
Version: ---CC: bugs, danken, dholler, mduarted, royoung
Target Milestone: ovirt-4.4.0Flags: pm-rhel: ovirt-4.4+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 19:57:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrej Cernek 2019-08-20 08:28:49 UTC
Description of problem:
Adding several security groups as the Custom property of vNIC profile leads to error during the update of port/ creation of new port instead of successful assignment of the security groups to the port.

How reproducible:
100%

Steps to Reproduce:
1. Create 2 security groups
2. Assign their ids to the security group Custom property of the vNIC profile of ovn network separated by comma
3. Update the existing port with this vNIC profile or create a new one

Actual results:
The port is not updated (not plugged)/ not created

Expected results:
The port is updated/ created with the correct security groups.

Additional info:
Neither using comma and whitespace (A) nor just using comma (B) works - in both cases it results in incorrect parsing.
(A) Input in vNIC profile: "b291ed03-667e-46c6-8294-bd849a7f7df3, d19cdd7b-596b-4819-a2d3-cf5a9e1a9163"
REST API request body:
{
  "port" : {
    "binding:host_id" : "6a07a859-c748-4541-939c-be227498c55a",
    "mac_address" : "56:6f:f8:c9:00:00",
    "security_groups" : [ "b291ed03-667e-46c6-8294-bd849a7f7df3", " d19cdd7b-596b-4819-a2d3-cf5a9e1a9163" ]
  }
}
Error message: Port group  d19cdd7b-596b-4819-a2d3-cf5a9e1a9163 does not exist

(B) Input in vNIC profile: "b291ed03-667e-46c6-8294-bd849a7f7df3,d19cdd7b-596b-4819-a2d3-cf5a9e1a9163"
REST API request body:
{
  "port" : {
    "binding:host_id" : "6a07a859-c748-4541-939c-be227498c55a",
    "mac_address" : "56:6f:f8:c9:00:00",
    "security_groups" : [ "b291ed03-667e-46c6-8294-bd849a7f7df3", "-596b-4819-a2d3-cf5a9e1a9163" ]
  }
}
Error message: Port group -596b-4819-a2d3-cf5a9e1a9163 does not exist

Comment 2 Dan Kenigsberg 2020-01-19 10:23:00 UTC
https://gerrit.ovirt.org/#/c/22651/8/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql@743

"Allow to specify SecurityGroups property for vNICs, containing either an empty string or a list of one or more comma seperated UUIDs."

Comment 3 Michael Burman 2020-01-22 06:24:39 UTC
Verified on - rhvm-4.4.0-0.14.master.el7.noarch with ovirt-provider-ovn-1.2.29-1.el7ev.noarch

Comment 4 Sandro Bonazzola 2020-05-20 19:57:47 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 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.