Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-25091

Edit resource limits wizard: setting memory resource limits errors if you use the 2 duplicate MiB entries

    XMLWordPrintable

Details

    Description

      When editing memory settings in dialog "Edit resource limits", there is a duplicate value MiB in the Combos for Memory > "Request" and Memory > "Limit":

      You can have setting the limits error inexplicably in the following way:

      1. ASSERT: make sure that you have an application with a service, replication controller/deployment config running in OpenShift (ex. create one using the nodejs-mongo-persistent template)
      2. EXEC: in OpenShift explorer: select the service for your application and pick "Edit resource limit" in the context menu for it
      3. ASSERT: "Edit resource limit" dialog shows up
      4. EXEC: set Memory > Request to 128 and pick the 1st MiB entry in the combo
      5. EXEC: set Memory > Limit to 512 and pick the 2nd MiB entry in the combo
      6. EXEC: "Finish" the wizard

      Result:
      The wizard errors telling you that the limit must be equal or greater than the request:

      In the Eclipse log you find the following:

      com.openshift.restclient.OpenShiftException: Exception trying to PUT https://192.168.64.12:8443/oapi/v1/namespaces/nodejs/deploymentconfigs/nodejs-mongo-persistent response code: 422 DeploymentConfig "nodejs-mongo-persistent" is invalid: spec.template.spec.containers[0].resources.limits: Invalid value: "512": must be greater than or equal to memory request
      	at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.createOpenShiftException(ResponseCodeInterceptor.java:114)
      	at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.intercept(ResponseCodeInterceptor.java:65)
      	at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
      	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
      	at okhttp3.RealCall.execute(RealCall.java:57)
      	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:258)
      	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:222)
      	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:210)
      	at com.openshift.internal.restclient.DefaultClient.update(DefaultClient.java:316)
      	at org.jboss.tools.openshift.core.connection.Connection.updateResource(Connection.java:451)
      	at org.jboss.tools.openshift.internal.ui.wizard.common.EditResourceLimitsHandler$EditResourceLimitsWizard$1.run(EditResourceLimitsHandler.java:117)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
      

      Attachments

        1. edit-resource-limits.png
          edit-resource-limits.png
          36 kB
        2. error-limit-must-be-equal-or-greater-than-request.png
          error-limit-must-be-equal-or-greater-than-request.png
          60 kB
        3. image-2017-09-22-13-02-35-216.png
          image-2017-09-22-13-02-35-216.png
          244 kB
        4. memory-limit-limit.png
          memory-limit-limit.png
          16 kB
        5. memory-request-limit.png
          memory-request-limit.png
          18 kB
        6. request-resource-limit-combo.png
          request-resource-limit-combo.png
          27 kB
        7. resource-limits-web-console.png
          resource-limits-web-console.png
          49 kB
        8. units.png
          units.png
          6 kB

        Issue Links

          Activity

            People

              adietish@redhat.com André Dietisheim
              jkopriva@redhat.com Josef Kopriva
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: