Bug 2069086

Summary: Impossible to reset linux-bridge vlan-filtering with vlan: {}
Product: Container Native Virtualization (CNV) Reporter: Quique Llorente <ellorent>
Component: NetworkingAssignee: Petr Horáček <phoracek>
Status: CLOSED DUPLICATE QA Contact: Nir Rozen <nrozen>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.10.0CC: amalykhi, aos-bugs, cnv-qe-bugs, cstabler
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2067081 Environment:
Last Closed: 2022-05-05 11:39:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2067081    
Bug Blocks:    

Description Quique Llorente 2022-03-28 09:01:06 UTC
+++ This bug was initially created as a clone of Bug #2067081 +++

Description of problem:
To reset vlan-filtering from a linux bridge it was possible to specify "vlan: {}" at the bridge port, this is no longer the case and it get merged with previous vlan config so it isn't reset.


Version-Release number of selected component (if applicable):
kubernetes-nmstate-handler-container-v4.10.0-49



How reproducible: Always


Steps to Reproduce:

1. Create a linux-bridge with vlan-filtering

cat <<EOF | kubectl apply -f -
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
meta:
  name: linux-bridge-vlan-filtering
spec:
  desiredState
    interfaces:
    - name: dummy1
      type: dummy
      state: up
    - name: linux-br0
      type: linux-bridge
      state: up
      bridge:
        port:
          - name: dummy1
            stp-hairpin-mode: false
            stp-path-cost: 100
            stp-priority: 32
            vlan:
              mode: trunk
              trunk-tags:
                - id: 101
                - id-range:
                    min: 500
                    max: 599
              tag: 100
              enable-native: true
EOF

2. Reset the vlan-filtering at the bridge

cat <<EOF | kubectl apply -f -
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
meta:
  name: linux-bridge-vlan-filtering
spec:
  desiredState
    interfaces:
    - name: dummy1
      type: dummy
      state: up
    - name: linux-br0
      type: linux-bridge
      state: up
      bridge:
        port:
          - name: dummy1
            stp-hairpin-mode: false
            stp-path-cost: 100
            stp-priority: 32
            vlan: {}
EOF


Actual results:
Vlan configuration is still there
The vlan configuration is still there

kubectl get nns -o yaml |grep vlan -A 8
      vlan:
        enable-native: true
        mode: trunk
        tag: 100
        trunk-tags:
        - id: 101
        - id-range:
            max: 599
            min: 500



Expected results:
The vlan configuration should be gone


Additional info:
It was discover as part of https://github.com/nmstate/nmstate/pull/1830, it also found that there is a false possitive at the test_disable_vlan_filtering_on_bridge integration test

Comment 1 Petr Horáček 2022-05-05 11:39:35 UTC
Since we don't ship knmstate in CNV anymore, I'm marking this as a duplicate for https://bugzilla.redhat.com/show_bug.cgi?id=2067081, which should fix this issue in the standalone operator.

*** This bug has been marked as a duplicate of bug 2067081 ***