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

Should check hostPort usage before creating nodePort to avoid port conflict.

XMLWordPrintable

    • Important
    • No
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      OpenShift didn't check the hostPort usage before creating a nodePort for a same port.
      Neither our document mentioned user should avoid overlapping with OCP default ports[1]
      
      This would allow user creating a nodePort overlapping with an existing hostPort by accident. 
      
      
      [1] - https://github.com/openshift/enhancements/blob/master/dev-guide/host-port-registry.md

      Steps to Reproduce:

      1. Expand the node port range to 9000-32767 [1]
      2. Create any example pod and a NodePort using 9101 which should be already used by openshift-sdn pod as a hostPort.
      3. Curl the nodeIp:9101. It's connect to our example pod, instead of openshift-sdn 

      Actual results:

      User's nodePort will conflict with OpenShift default ports. Causing networking trouble.

      Expected results:

      OCP should not allow user to expand the node port overlapping with default ports.
      Or, scheduler or controller-manager should detect the hostPort usage before creating a nodePort 

      Additional info:

       

              bbennett@redhat.com Ben Bennett
              rhn-support-jaliang Jace Liang
              Jitendar Singh Jitendar Singh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: