Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-7830

Management REST API rebalance endpoints return confusing operationResults

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: management
    • Labels:
      None

      Description

      We observed odd behavior regarding the operationResult object returned in the rebalance API:

      1. It contains success=false if the cluster has no regions or has no servers. This is confusing because the rebalance didn't fail — it just didn't have anything to rebalance so it was basically a no-op. As a consumer of this API, I need to be able to distinguish between "real" failures and this "no-op" failure, and I should not have to write code to parse the "statusMessage" to do that.
      2. Sometimes, success=true and other times success=false for the same statusMessage: "Distributed system has no regions that can be rebalanced." This is confusing because I don't know why it sometimes considers this a failure and other times considers it a success. If #1 above is fixed, then this would not be an issue because it would always return success=true for this particular statusMessage.

      Here is an example of two confusing operationResults we observed:

      {
        "result": [
          {
            "statusCode": "OK",
            "links": {
              "self": "http://geodecluster-sample-locator.default/management/v1/operations/rebalances/15dfe6ef-acaf-4a45-9b55-1d855a977ba8",
              "list": "http://geodecluster-sample-locator.default/management/v1/operations/rebalances"
            },
            "operationStart": "2020-02-25T18:53:34.058Z",
            "operationEnd": "2020-02-25T18:53:34.063Z",
            "operationId": "15dfe6ef-acaf-4a45-9b55-1d855a977ba8",
            "operation": {
              "simulate": false
            },
            "operationResult": {
              "statusMessage": "Distributed system has no regions that can be rebalanced.",
              "success": true
            }
          },
          {
            "statusCode": "OK",
            "links": {
              "self": "http://geodecluster-sample-locator.default/management/v1/operations/rebalances/8218ce0d-e3b8-4c49-b925-665a28e821c3",
              "list": "http://geodecluster-sample-locator.default/management/v1/operations/rebalances"
            },
            "operationStart": "2020-02-25T18:53:45.650Z",
            "operationEnd": "2020-02-25T18:53:45.654Z",
            "operationId": "8218ce0d-e3b8-4c49-b925-665a28e821c3",
            "operation": {
              "simulate": false
            },
            "operationResult": {
              "statusMessage": "Distributed system has no regions that can be rebalanced.",
              "success": false
            }
          }
        ],
        "statusCode": "OK"
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dschneider Darrel Schneider
                Reporter:
                aaronlindsey Aaron Lindsey
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m