Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-22987

multus default-route parameter not working in 4.12 [4.13]

XMLWordPrintable

    • Important
    • No
    • False
    • Hide

      None

      Show
      None

      Description of problem: The default-route parameter for the */networks annotation for Multus secondary networks does not appear to be taking effect.

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

      How reproducible: With the following resources

      Steps to Reproduce:

      ---
      apiVersion: "k8s.cni.cncf.io/v1"
      kind: NetworkAttachmentDefinition
      metadata:
        name: bridge-conf
      spec:
        config: '{
          "cniVersion": "0.3.0",
          "type": "bridge",
          "ipam": {
              "type": "whereabouts",
              "ipRanges": [
                  {
                      "range": "192.168.12.0/24",
                      "range_start": "192.168.12.50",
                      "range_end": "192.168.12.100"
                  },
                  {
                      "range": "2001:db8::/32"
                  }
              ]
          }
        }'
      ---
      apiVersion: v1
      kind: Pod
      metadata:
        name: samplepod
        annotations:
          k8s.v1.cni.cncf.io/networks: '[{"interface":"test0","name":"bridge-conf", "default-route": ["192.168.12.254", "2001:db8::ff"]}]'
      spec:
        containers:
        - name: samplepod
          command: ["/bin/ash", "-c", "trap : TERM INT; sleep infinity & wait"]
          image: alpine
      
      $ oc version | grep -i server
      Server Version: 4.12.0-0.ci-2023-10-25-074812
      

      Actual results:

      $ oc exec -it samplepod -- ip route
      10.128.0.0/14 via 10.131.0.1 dev eth0 
      10.131.0.0/23 dev eth0 scope link  src 10.131.0.23 
      172.30.0.0/16 via 10.131.0.1 dev eth0 
      192.168.12.0/24 dev test0 scope link  src 192.168.12.50 
      
      $ oc exec -it samplepod -- ip -6 route
      2001:db8::/32 dev test0  metric 256 
      fe80::/64 dev eth0  metric 256 
      fe80::/64 dev test0  metric 256 
      multicast ff00::/8 dev eth0  metric 256 
      multicast ff00::/8 dev test0  metric 256 
      

      Expected results:

      should contain: default via ...
      

      Additional info: Test includes whereabouts, but whereabouts has no been isolated.

              tohayash@redhat.com Tomofumi Hayashi
              dosmith Douglas Smith
              Weibin Liang Weibin Liang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: