Bug 1313694

Summary: Storage pool listing API output does not contain all the set values for the pool
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Shubhendu Tripathi <shtripat>
Component: CalamariAssignee: Christina Meno <gmeno>
Calamari sub component: Back-end QA Contact: shylesh <shmohan>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: ceph-eng-bugs, flucifre, hnallurv, kdreyer
Version: 1.3.1   
Target Milestone: rc   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: calamari-server-1.4.0-rc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-23 19:32:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1291304    

Description Shubhendu Tripathi 2016-03-02 09:05:46 UTC
Description of problem:
Storage pool listing API output does not contain all the set values for the pool. Its not possible to make out if the pool is standard replicated or erasure coded.

Missing fields are -

erasure_code_profile
hit_set_type
hit_set_period
hit_set_count
hit_set_fpp
auid
target_max_objects
target_max_bytes
cache_target_dirty_ratio
cache_target_full_ratio
cache_min_flush_age
cache_min_evict_age
min_read_recency_for_promote
write_fadvise_dontneed

I understand if erausre_code_profile is set, it can be treated as a erasure coded pool. But the same does not get listed as REST output.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a ceph cluster
2. Create a erasure coded pool
3. Access the calamari api /api/v2/cluster/{id}/pool/{poolid}

Actual results:
Pool details dont contain all the set values


Expected results:
Pool details should contain all the set values

Additional info:

Comment 2 Christina Meno 2016-04-18 15:43:10 UTC
The only field I am going to provide in this work is a field that describes the name of the erasure_code_profile. I'm not going to expose every field present in the pool. This can wait till we are doing something meaningful with it eg cache-tiering.

Comment 5 Harish NV Rao 2016-06-09 14:54:02 UTC
"erasure_code_profile" is not displayed for the erasure coded pools. The pools with id 6 and 7 below are erasure coded pools.

GET /api/v1/cluster/c75da670-7316-4a6b-9ff7-4ed0af98b9fc/pool
HTTP 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Allow: GET, HEAD, OPTIONS

[
    {
        "pool_id": 4, 
        "name": "pool1", 
        "quota_max_bytes": 0, 
        "quota_max_objects": 0, 
        "used_objects": null, 
        "used_bytes": null, 
        "id": 4, 
        "cluster": "c75da670-7316-4a6b-9ff7-4ed0af98b9fc"
    }, 
    {
        "pool_id": 5, 
        "name": "TEST", 
        "quota_max_bytes": 0, 
        "quota_max_objects": 0, 
        "used_objects": null, 
        "used_bytes": null, 
        "id": 5, 
        "cluster": "c75da670-7316-4a6b-9ff7-4ed0af98b9fc"
    }, 
    {
        "pool_id": 6, 
        "name": "ecpool", 
        "quota_max_bytes": 0, 
        "quota_max_objects": 0, 
        "used_objects": null, 
        "used_bytes": null, 
        "id": 6, 
        "cluster": "c75da670-7316-4a6b-9ff7-4ed0af98b9fc"
    }, 
    {
        "pool_id": 7, 
        "name": "ecpool1", 
        "quota_max_bytes": 0, 
        "quota_max_objects": 0, 
        "used_objects": null, 
        "used_bytes": null, 
        "id": 7, 
        "cluster": "c75da670-7316-4a6b-9ff7-4ed0af98b9fc"
    }
]

Versions:
calamari-server-1.4.0-0.12.rc15.el7cp.x86_64
ceph version 10.2.1-12.el7cp

Comment 6 Christina Meno 2016-06-09 16:01:08 UTC
Harish this is the wrong URL to test
The correct one is /api/v2/cluster/FSID/pool

Comment 7 Harish NV Rao 2016-06-22 07:31:29 UTC
oops. my bad. 

Tested with api/v2/cluster/<fs-id>/pool and found "erasure_code_profile" being displayed.

GET /api/v2/cluster/1445c933-4559-4fd0-a350-9edb3fb4dc96/pool
HTTP 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Allow: GET, POST, HEAD, OPTIONS
:
:
:
{
        "name": "ecpool", 
        "id": 1, 
        "size": 3, 
        "pg_num": 12, 
        "crush_ruleset": 1, 
        "min_size": 2, 
        "crash_replay_interval": 0, 
        "pgp_num": 12, 
        "hashpspool": true, 
        "full": false, 
        "quota_max_objects": 0, 
        "quota_max_bytes": 0, 
        "type": "erasure", 
        "erasure_code_profile": "default"
    }
]

Moving this bz to verified state.

Tested on:
 calamari-server-1.4.2-1.el7cp.x86_64
 ceph version 10.2.2-5.el7cp

Comment 9 errata-xmlrpc 2016-08-23 19:32:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1755