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

Implement check for overlapping UDN and Hybrid Networking Subnet

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There's no check/mechanism implemented at UDN level to identify if the subnet range specified in UserDefinedNetwork overlaps with hybridClusterNetwork that gets used for Windows Containers.

       

      $ oc get network.operator.openshift.io cluster -oyaml
      apiVersion: operator.openshift.io/v1
      kind: Network
      metadata:
        creationTimestamp: "2025-04-07T13:52:09Z"
        generation: 3
        name: cluster
        resourceVersion: "44612"
        uid: 1091562b-3323-4789-bd6e-37cb887066a5
      spec:
        clusterNetwork:
        - cidr: 10.128.0.0/14
          hostPrefix: 23
        defaultNetwork:
          ovnKubernetesConfig:
            egressIPConfig: {}
            gatewayConfig:
              ipv4: {}
              ipv6: {}
              routingViaHost: false
            genevePort: 6081
            hybridOverlayConfig:
              hybridClusterNetwork:   <-----
              - cidr: 192.168.0.0/16  <-----
                hostPrefix: 23
            ipsecConfig:
              mode: Disabled
            mtu: 8901
            policyAuditConfig:
              destination: "null"
              maxFileSize: 50
              maxLogFiles: 5
              rateLimit: 20
              syslogFacility: local0
          type: OVNKubernetes
        deployKubeProxy: false
        disableMultiNetwork: false
        disableNetworkDiagnostics: false
        logLevel: Normal
        managementState: Managed
        observedConfig: null
        operatorLogLevel: Normal
        serviceNetwork:
        - 172.30.0.0/16
        unsupportedConfigOverrides: null
        useMultiNetworkPolicy: false
      
       
      $ oc get ns httpd -oyaml
      apiVersion: v1
      kind: Namespace
      metadata:
      ...
        labels:
          k8s.ovn.org/primary-user-defined-network: ""
      ...
      
      
      $ oc get userdefinednetwork verify-eth0 -oyaml -n httpd
      apiVersion: k8s.ovn.org/v1
      kind: UserDefinedNetwork
      metadata:
        annotations:
      ...
        generation: 1
        name: verify-eth0
        namespace: httpd
        resourceVersion: "71715"
        uid: 43ec2dff-ab18-4a73-846b-aa6cf41757bc
      spec:
        layer2:
          role: Primary
          subnets:
          - 192.168.0.0/24   <------
        topology: Layer2
      
      
      $ oc describe pod httpd-24-786bfc6d59-zpffh -n httpd | grep k8s.v1.cni.cncf.io/network-status -A15
                        k8s.v1.cni.cncf.io/network-status:
                          [{
                              "name": "ovn-kubernetes",
                              "interface": "eth0",
                              "ips": [
                                  "10.129.0.44"
                              ],
                              "mac": "0a:58:0a:81:00:2c",
                              "dns": {}
                          },{
                              "name": "ovn-kubernetes",
                              "interface": "ovn-udn1",   <-----
                              "ips": [
                                  "192.168.0.68"   <------
                              ],
                              "mac": "0a:58:c0:a8:00:44"
      
      
      
      $ oc get pod windows-iis-app-new-64f8b8bff7-2ctrs -o wide -n windows
      NAME                                   READY   STATUS    RESTARTS   AGE   IP             NODE                          NOMINATED NODE   READINESS GATES
      windows-iis-app-new-64f8b8bff7-2ctrs   1/1     Running   0          28m   192.168.0.68   ip-10-0-21-203.ec2.internal   <none>           <none>

              sdn-team-bot sdn-team bot
              rhn-support-aygarg Ayush Garg
              None
              None
              Anurag Saxena Anurag Saxena
              None
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: