Bug 1054827 - [RFE] Get the volume usage through RHS-C API
Summary: [RFE] Get the volume usage through RHS-C API
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhsc-sdk
Version: 2.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: RHGS 3.1.0
Assignee: Shubhendu Tripathi
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On:
Blocks: 1202842
TreeView+ depends on / blocked
 
Reported: 2014-01-17 14:45 UTC by Vimal Kumar
Modified: 2019-07-11 07:50 UTC (History)
9 users (show)

Fixed In Version: rhsc-3.1.0-57
Doc Type: Enhancement
Doc Text:
Now Gluster volume usage statistics available through REST API. The volume usage details are available under /api/clusters/{id}/glustervolumes/{id}/statistics.
Clone Of:
Environment:
Last Closed: 2015-07-29 05:25:17 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:1494 0 normal SHIPPED_LIVE Red Hat Gluster Storage Console 3.1 Enhancement and bug fixes 2015-07-29 09:24:02 UTC
oVirt gerrit 22579 0 None None None Never

Description Vimal Kumar 2014-01-17 14:45:25 UTC
1) Description of problem:

As of now, RHS-C API doesn't have an implementation which can show the volume usage details. This is a request for this feature to be implemented in the API.

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

RHS2.1, RHS-C

3) How reproducible:

Always

4) Steps to Reproduce:

a) Install RHS2.1 nodes
b) Install a RHEL6, and install RHS-C
c) From the client machine, get the cert using 'curl'.
d) Get information about the hosts using 'curl' with the certificate. For example :

# curl -X GET -H "Accept: application/xml" -u "admin@internal:<XXX>" -k https://<IP-ADDRESS>/api/hosts

The returned XML doesn't contain the usage details (Available space, Used space etc..) of the volumes.

5) Actual results:

The XML output from the RHS-C machine doesn't show the volume usage details from the RHS nodes.

6) Expected results:

We should get more details on the volume usage in the XML output.

Comment 2 Sahina Bose 2014-07-16 06:25:00 UTC
This is now available as part of upstream oVirt 3.5
under /api/clusters/{id}/glustervolumes/{id}/statistics

Comment 6 RamaKasturi 2015-05-29 06:00:54 UTC
Verified and works fine with build rhsc-extensions-api-impl-3.1.0-0.57.master.el6.noarch
rhsc-setup-3.1.0-0.57.master.el6.noarch
rhsc-setup-plugins-3.1.0-0.el6rhs.noarch
rhsc-monitoring-uiplugin-0.1.3-1.el6rhs.noarch
rhsc-branding-rhs-3.1.0-0.el6rhs.noarch
rhsc-setup-base-3.1.0-0.57.master.el6.noarch
rhsc-dbscripts-3.1.0-0.57.master.el6.noarch
rhsc-lib-3.1.0-0.57.master.el6.noarch
rhsc-webadmin-portal-3.1.0-0.57.master.el6.noarch
redhat-access-plugin-rhsc-3.0.0-3.el6rhs.noarch
rhsc-3.1.0-0.57.master.el6.noarch
rhsc-sdk-python-3.0.0.0-0.2.el6rhs.noarch
rhsc-log-collector-3.0.0-4.0.el6rhs.noarch
rhsc-setup-plugin-ovirt-engine-3.1.0-0.57.master.el6.noarch
rhsc-restapi-3.1.0-0.57.master.el6.noarch
rhsc-setup-plugin-ovirt-engine-common-3.1.0-0.57.master.el6.noarch
rhsc-backend-3.1.0-0.57.master.el6.noarch
rhsc-doc-3.0.4-4.el6rhs.noarch
rhsc-cli-3.0.0.0-0.2.el6rhs.noarch
rhsc-tools-3.1.0-0.57.master.el6.noarch


When user tries to access the rest api through browser the following output gets displayed. 

https://10.70.37.66/api/clusters/{clusterid}/glustervolumes/{volumeid}/statistics

ouput:

<statistics><statistic id="cb788562-80aa-34fe-9097-562942ce326d"><name>memory.total.size</name><description>Total size</description><values type="INTEGER"><value><datum>48293740544</datum></value></values><type>GAUGE</type><unit>BYTES</unit><gluster_volume href="/api/clusters/0c74f22f-04d8-4c25-8c96-027f74ac2c75/glustervolumes/150c50c4-775f-41c7-9b55-f3b8223b1804" id="150c50c4-775f-41c7-9b55-f3b8223b1804"/></statistic><statistic id="fc6defe5-c63a-35da-b042-baf33a94e4aa"><name>memory.free.size</name><description>Free size</description><values type="INTEGER"><value><datum>48258875392</datum></value></values><type>GAUGE</type><unit>BYTES</unit><gluster_volume href="/api/clusters/0c74f22f-04d8-4c25-8c96-027f74ac2c75/glustervolumes/150c50c4-775f-41c7-9b55-f3b8223b1804" id="150c50c4-775f-41c7-9b55-f3b8223b1804"/></statistic><statistic id="168dc22f-a086-34ca-a646-61c647d853ce"><name>memory.used.size</name><description>Used size</description><values type="INTEGER"><value><datum>34865152</datum></value></values><type>GAUGE</type><unit>BYTES</unit><gluster_volume href="/api/clusters/0c74f22f-04d8-4c25-8c96-027f74ac2c75/glustervolumes/150c50c4-775f-41c7-9b55-f3b8223b1804" id="150c50c4-775f-41c7-9b55-f3b8223b1804"/></statistic></statistics>

Comment 7 Divya 2015-07-26 11:43:19 UTC
Shubhendu,

Could you review and sign-off the edited doc text.

Comment 8 Shubhendu Tripathi 2015-07-27 04:24:22 UTC
doc-text looks fine

Comment 10 errata-xmlrpc 2015-07-29 05:25:17 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://rhn.redhat.com/errata/RHEA-2015-1494.html


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