Bug 1342504 - 2.0: crush_rule API: GET of crush rule lists some values as null for "steps"
Summary: 2.0: crush_rule API: GET of crush rule lists some values as null for "steps"
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: Calamari
Version: 2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 2.3
Assignee: Christina Meno
QA Contact: ceph-qe-bugs
Bara Ancincova
URL:
Whiteboard:
Depends On:
Blocks: 1322504 1383917 1412948
TreeView+ depends on / blocked
 
Reported: 2016-06-03 11:56 UTC by Harish NV Rao
Modified: 2017-04-04 18:21 UTC (History)
3 users (show)

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.
Clone Of:
Environment:
Last Closed: 2017-04-04 18:21:48 UTC


Attachments (Terms of Use)

Description Harish NV Rao 2016-06-03 11:56:11 UTC
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 Christina Meno 2016-06-09 16:15:47 UTC
if you remove the values marked as null this will patch fine

Comment 8 Christina Meno 2016-07-13 16:08:28 UTC
I'll look at it today

Comment 9 Christina Meno 2016-08-17 16:35:23 UTC
Looks good


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