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

Scaling OS3 application does not work properly

    XMLWordPrintable

Details

    • Hide

      ASSERT: Have a running OpenShift 3 application created on eap-64-basic s2i template.
      EXEC: Open context menu Edit... on Repplication controller (called Deployments in properties view).
      ASSERT: Amount of replicas is set to 1 and save.
      EXEC: Set amount of replicas to 2.
      ASSERT: There are 2 pods of the application in state Running (wait till its running)
      EXEC: Change amount of replicas to 1 and save.

      RESULT: Error pops up and changes are not propagated.
      EXPECTED RESULT: Amount of running pods of application is reduced to 1.

      Show
      ASSERT: Have a running OpenShift 3 application created on eap-64-basic s2i template. EXEC: Open context menu Edit... on Repplication controller (called Deployments in properties view). ASSERT: Amount of replicas is set to 1 and save. EXEC: Set amount of replicas to 2. ASSERT: There are 2 pods of the application in state Running (wait till its running) EXEC: Change amount of replicas to 1 and save. RESULT: Error pops up and changes are not propagated. EXPECTED RESULT: Amount of running pods of application is reduced to 1.

    Description

      When I am trying to scale application via tooling, first attempt to set replicas amount works but every consecutive attempt to edit same resource fails. See following screenshot of the error followed by stack trace

      com.openshift.restclient.OpenShiftException: Could not update resource eap-app-1: {
        "kind": "Status",
        "apiVersion": "v1",
        "metadata": {},
        "status": "Failure",
        "message": "replicationControllers \"eap-app-1\" cannot be updated: the object has been modified; please apply your changes to the latest version and try again",
        "reason": "Conflict",
        "details": {
          "name": "eap-app-1",
          "kind": "replicationControllers"
        },
        "code": 409
      }
      
          at com.openshift.internal.restclient.DefaultClient.createOpenShiftException(DefaultClient.java:480)
          at com.openshift.internal.restclient.DefaultClient.update(DefaultClient.java:247)
          at org.jboss.tools.openshift.internal.ui.property.OpenShiftResourceDocumentProvider$2.run(OpenShiftResourceDocumentProvider.java:92)
          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      Caused by: com.openshift.internal.restclient.http.HttpClientException: {
        "kind": "Status",
        "apiVersion": "v1",
        "metadata": {},
        "status": "Failure",
        "message": "replicationControllers \"eap-app-1\" cannot be updated: the object has been modified; please apply your changes to the latest version and try again",
        "reason": "Conflict",
        "details": {
          "name": "eap-app-1",
          "kind": "replicationControllers"
        },
        "code": 409
      }
      
          at com.openshift.internal.restclient.http.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:226)
          at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:191)
          at com.openshift.internal.restclient.http.UrlConnectionHttpClient.put(UrlConnectionHttpClient.java:119)
          at com.openshift.internal.restclient.DefaultClient.update(DefaultClient.java:243)
          ... 2 more
      Caused by: java.io.IOException: Server returned HTTP response code: 409 for URL: https://10.1.2.2:8443/api/v1/namespaces/project01/replicationcontrollers/eap-app-1
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
          at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
          at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:187)
          ... 4 more
      
      
      

      Attachments

        1. edit_error.png
          edit_error.png
          103 kB
        2. sample of a file changed dialog.png
          sample of a file changed dialog.png
          27 kB
        3. Nag Dialog.png
          Nag Dialog.png
          22 kB

        Issue Links

          Activity

            People

              jcantril@redhat.com Jeffrey Cantrill
              mlabuda_jira Marián Labuda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: