Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-1880 Decommissioning and maintenance mode in Ozone
  3. HDDS-2349

QueryNode does not respect null values for opState or state

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.5.0
    • 0.5.0
    • SCM

    Description

      In HDDS-2197, the queryNode API call was changed to allow operational state (in_service, decommissioning etc) to be passed along with the node health state. This changed allowed for a null state to indicate a wildcard, so passing:

      opState = null
      healthState = HEALTHY

      Allows one to find all the healthy nodes, irrespective of their opState.

      However, for an enum protobuf field, if no value is specified, the first enum in the set is returned as the default. This means that when a null is passed for opState, only the IN_SERVICE nodes are returned. Similar for health state - passing a null will return only HEALTHY nodes.

      This PR will fix this issue so the null value acts as a wildcard as intended.

      Attachments

        Issue Links

          Activity

            People

              sodonnell Stephen O'Donnell
              sodonnell Stephen O'Donnell
              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 - 20m
                  20m