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

Do not allow the starting port number of serviceNodePortRange to be changed to a smaller one

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.20
    • 4.13, 4.12, 4.14, 4.15, 4.16, 4.17, 4.18, 4.19
    • kube-apiserver
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • 5
    • None
    • No
    • None
    • None
    • None
    • OSDOCS Sprint 259, OSDOCS Sprint 260
    • 2
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      Do not allow the starting port number of serviceNodePortRange to be changed to a smaller one.
      
      The current document [1] describes how to extend “serviceNodePortRange” as follows:
      
      1. To expand the node port range, enter the following command. Replace <port> with the largest port number in the new range.
      ~~~
      $ oc patch network.config.openshift.io cluster --type=merge -p \
        '{
          "spec":
            { "serviceNodePortRange": "30000-<port>" }
        }'
      ~~~
      [1] https://docs.openshift.com/container-platform/4.15/networking/configuring-node-port-service-range.html
      
      However, as of now, changing the starting port number of “serviceNodePortRange” to a smaller one is not an error.
      At this point, however, the process of changing the starting port number(30000) in "serviceNodePortRange" to a smaller one does not fail.
      
      

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

      4.15
      

      How reproducible:

      eg) 
      Change the "serviceNodePortRange" from "30000-32768" to "29000-32768".
      
      oc patch network.config.openshift.io cluster --type=merge -p '{ "spec": { "serviceNodePortRange": "29000-32768" } }'
      

      Actual results:

      no error
      
      $ oc patch network.config.openshift.io cluster --type=merge -p '{ "spec": { "serviceNodePortRange": "29000-32768" } }'
      network.config.openshift.io/cluster patched
      
      $ oc get network -o yaml cluster
      apiVersion: config.openshift.io/v1
      kind: Network
      ...
      spec:
        ...
        serviceNodePortRange: 29000-32768
      

      Expected results:

      should terminate with an error

      Additional info:

      I believe that the code should be changed to strengthen error checking to avoid unnecessary problems.
      Alternatively, I believe that the documentation should be modified to clearly state that the starting port number cannot be changed, although this will not result in an error.
       

              dfitzmau@redhat.com Darragh Fitzmaurice
              rhn-support-hfukumot Hideshi Fukumoto
              None
              None
              Rahul Gangwar Rahul Gangwar
              None
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: