RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2111398 - [RFE] Support VLAN trunk mode and and trunk-tags range for OVS-bridge
Summary: [RFE] Support VLAN trunk mode and and trunk-tags range for OVS-bridge
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nmstate
Version: 9.1
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: 9.2
Assignee: Beniamino Galvani
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On: 2111959
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-27 08:56 UTC by Yossi Segev
Modified: 2023-05-09 08:20 UTC (History)
9 users (show)

Fixed In Version: nmstate-2.2.2-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2111959 (view as bug list)
Environment:
Last Closed: 2023-05-09 07:31:01 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 2115 0 None Merged ovs: add support for port trunks 2022-12-14 03:26:59 UTC
Red Hat Issue Tracker RHELPLAN-129207 0 None None None 2022-07-27 09:15:27 UTC
Red Hat Product Errata RHBA-2023:2190 0 None None None 2023-05-09 07:31:15 UTC

Description Yossi Segev 2022-07-27 08:56:37 UTC
Description of problem:
Currently nmstate doesn't suepport reating an OVS bridge, with a VLAN port in trunk mode and trunk-tags range.


Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux CoreOS 411.86.202207150124-0
RHEL 8.6
NetworkManager (on cluster worker node): 1.36.0-7.el8_6
NetworkManager (on nmstate-handler pod): 1.36.0-7.el8_6
nmstate (on nmstate-handler pod): nmstate-1.2.1-3.el8_6.x86_64


How reproducible:
100%


Steps to Reproduce:
1. Create an OVS bridge with a VLAN port in trunk mode and trunk-tags range.
I used the following policy to achieve that:

apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: ovs-bridge-policy
spec:
  desiredState:
    interfaces:
    - bridge:
        options:
          stp: false
        port:
        - name: eno4
          vlan:
            mode: trunk
            trunk-tags:
            - id-range:
                max: 1019
                min: 1000
      name: br1test
      state: up
      type: ovs-bridge
  nodeSelector:
    node-role.kubernetes.io/worker: ""

(Modify port name and VLAN id-range per according to your environment).


Actual results:
The configuration fails to configure after timeout:
$ oc get nncp -w
NAME                STATUS        REASON
ovs-bridge-policy   Progressing   ConfigurationProgressing
ovs-bridge-policy   Progressing   ConfigurationProgressing
ovs-bridge-policy   Degraded      FailedToConfigure


Expected results:
Successful configuration.


Additional info:
1. This configuration is not supported in NetworkManager as well (not only in nmstate).

2. The same configuration succeeds when the bridge type is linux-bridge, i.e.
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: linux-bridge-policy
spec:
  desiredState:
    interfaces:
    - bridge:
        options:
          stp: false
        port:
        - name: eno4
          vlan:
            mode: trunk
            trunk-tags:
            - id-range:
                max: 1019
                min: 1000
      name: br1test
      state: up
      type: linux-bridge
  nodeSelector:
    node-role.kubernetes.io/worker: ""

3. The same configuration (OVS bridge) succeeds, with a VLAN port in access mode and an explicit ID tag, i.e.
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: ovs-bridge-policy
spec:
  desiredState:
    interfaces:
    - bridge:
        options:
          stp: false
        port:
        - name: eno4
          vlan:
            mode: access
            tag: 1021
      name: br1test
      state: up
      type: ovs-bridge
  nodeSelector:
    node-role.kubernetes.io/worker: ""

4. This was found on RHEL 8.6, however it can be targeted to RHEL 9.

Comment 1 Gris Ge 2022-07-27 09:00:24 UTC
This require support from NetworkManager also.

According to manpage of `ovs-vswitchd.conf.db`, we can use `trunks` property which can hold up to 4096 integers in range of 0 - 4095.

Comment 6 Gris Ge 2022-12-14 03:27:52 UTC
Upstream patch merged.

Example yaml:

```yml
  - name: ovs0
    type: ovs-interface
    state: up
  - name: ovs-br0
    type: ovs-bridge
    state: up
    bridge:
      port:
        - name: ovs0
          vlan:
            mode: trunk
            trunk-tags:
              - id-range:
                  min: 20
                  max: 22
              - id-range:
                  min: 30
                  max: 32
              - id: 40
```

Comment 10 Mingyu Shi 2023-01-19 08:17:12 UTC
Verified with:
nmstate-2.2.3-3.el9.x86_64
nispor-1.2.9-1.el9.x86_64
NetworkManager-1.41.8-1.el9.x86_64
openvswitch2.15-2.15.0-79.el9fdp.x86_64

Comment 12 errata-xmlrpc 2023-05-09 07:31:01 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 (nmstate 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/RHBA-2023:2190


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