Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1342504 - 2.0: crush_rule API: GET of crush rule lists some values as null for "steps"
2.0: crush_rule API: GET of crush rule lists some values as null for "steps"
Status: CLOSED NOTABUG
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: Calamari (Show other bugs)
2.0
Unspecified Unspecified
unspecified Severity medium
: rc
: 2.3
Assigned To: Gregory Meno
ceph-qe-bugs
Bara Ancincova
:
Depends On:
Blocks: 1322504 1383917 1412948
  Show dependency treegraph
 
Reported: 2016-06-03 07:56 EDT by Harish NV Rao
Modified: 2017-04-04 14:21 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
.Calamari sometimes incorrectly outputs "null" as a value When the Calamari REST-based API is used to get details of a CRUSH rule in the Ceph cluster, the output contains "null" as a value for certain fields in the `steps` section of the CRUSH rule. The fields containing null values can be safely ignored for the respective steps in the CRUSH rule. However, do not use "null" as a value for any field when doing a PATCH operation. Using null values in such a case causes the operation to fail.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-04 14:21:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Harish NV Rao 2016-06-03 07:56:11 EDT
Description of problem:
-----------------------

A GET of Crush rule lists some values as null for the "steps".
        "steps": [
            {
                "op": "take", 
                "type": null, 
                "num": null, 
                "item_name": "default", 
                "item": -1
            }, 
            {
                "op": "chooseleaf_firstn", 
                "type": "host", 
                "num": 0, 
                "item_name": null, 
                "item": null
            }, 
            {
                "op": "emit", 
                "type": null, 
                "num": null, 
                "item_name": null, 
                "item": null
            }

But the CLI the command " ceph osd crush rule dump" does not list that way. It lists as follows:

    "steps": [
        {
            "op": "take",
            "item": -1,
            "item_name": "default"
        },
        {
            "op": "chooseleaf_firstn",
            "num": 0,
            "type": "host"
        },
        {
            "op": "emit"
        }

Version-Release number of selected component (if applicable):
ceph version 10.2.1-7.el7cp (339d1fb5d73e5f113c8538a45e95b3777038da36)
calamari-server-1.4.0-0.10.rc13.el7cp.x86_64


How reproducible: always


Steps to Reproduce:
1. invoke https://<mon-ip>:8002/api/v2/cluster/<fs id>/crush_rule

Actual results:
Displays null for few values under "steps" section.

Expected results:
Should not display null values

Additional info:
The PATCH operation fails if we use null values
Comment 3 Gregory Meno 2016-06-09 12:15:47 EDT
if you remove the values marked as null this will patch fine
Comment 8 Gregory Meno 2016-07-13 12:08:28 EDT
I'll look at it today
Comment 9 Gregory Meno 2016-08-17 12:35:23 EDT
Looks good

Note You need to log in before you can comment on or make changes to this bug.