Uploaded image for project: 'OpenShift Request For Enhancement'
  1. OpenShift Request For Enhancement
  2. RFE-5383

Missing prevent and valid CNI configurations for localnet and ipBlock NAD topological

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • SDN
    • False
    • None
    • False
    • Not Selected
    • Engineering
    • 0
    • 0% 0%

      Description of problem:

      When creating a NAD with topologies "localnet" or "ipBlock" no validation is done over the spec fields.
      When creating a NAD with the wrong spec field of value, the NAD is created successfully but nothing is really changing in the configuration on the cluster due to the faulty definition. This can cause a lot time waste on debugging from the user side.

      Version-Release number of selected component (if applicable):

      4.15.0-rc.5

      How reproducible:

      100%

      Steps to Reproduce:

      1. Create a namespace:
      oc create new-project overlay-default-brex
      
      2. Create a NAD with a wrong spec field (wither the key or the value) - here it is the topology value:
      cat << EOF | oc create -f -
      apiVersion: k8s.cni.cncf.io/v1
      kind: NetworkAttachmentDefinition
      metadata:
        name: localnet-network-brex
        namespace: overlay-default-brex
      spec:
        config: |
          {
            "cniVersion": "0.3.1",
            "name": "localnet-network-brex",
            "type": "ovn-k8s-cni-overlay",
            "topology":"overlay",
            "mtu": 1500,
            "netAttachDefName": "overlay-default-brex/localnet-network-brex"
          }     

      Actual results:

      The NAD is created without a warning or error, but nothing changed in the actual network configurations - no new network was created.

      Expected results:

      Some validation and prevention mechanism the will show an error message and won't create the NAD.

      Additional info:

          

            pliurh Peng Liu
            rh-ee-awax Anat Wax
            Weibin Liang Weibin Liang
            Miguel Duarte de Mora Barroso
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: