Open r0h4n opened 6 years ago
@atinmu @prashanthpai @shirshendu @shtripat
@atinmu
Current state of things:
gluster pool list
(per node)This is present today as a consumable REST API. And you don't have to run it per node.
gluster get-state glusterd odir /var/run file $filename detail
(per node)gluster get-state glusterd odir /var/run file $filename volumeoptions
(per node, output of this command is intended to be used for day 1, day 2 operations)@r0h4n I need some more information on what (fields/data) do you consume in getstate output.
gluster volume heal $volname info split-brain --xml
(per cluster)gluster volume heal $volname info --xml
(per cluster)Heal commands implementation is under progress and the PR is under review.
gluster volume profile $volname info --xml
(per cluster)gluster volume profile $volname start
(per cluster)gluster volume profile $volname stop
(per cluster)Work on volume profile has not been started yet. Being tracked at https://github.com/gluster/glusterd2/issues/455
We already have an API for it which returns size info of the volume. glusterd2 does a mount internally.
@r0h4n In addition to the points mentioned by @prashanthpai I'd like to highlight that tendrl should consider to move parsing json format than --xml as the default GD2 API response would be over JSON.
@shtripat Please do confirm if none of the commands are missed out w.r.t current integration.
Events API integration https://github.com/gluster/glusterd2/issues/418 would also be a dependency for this integration.
Comment https://github.com/gluster/glusterd2/issues/716#issue-319523107 lists all the commands tendrl uses from gd1. In addition as @atinmu mentioned above we use the below commands to add/remove webhook for native events handling in tendrl
- gluster-eventsapi webhook-add {url}
- gluster-eventsapi webhook-del {url}
Details which are read from get-state output are as below
1. gluster get-state detail
* Peers details (uuid, state, connected, primary_hostname)
* Volumes details (id, status, name, arbiter_count, type, transport_type, brickcount, snap-count, stripe_count, replica_count, subvol_count, disperse_count, redundancy_count, quorum_status, snapd_svc.online_status, snapd_svc.inited, profile_enabled, )
* Volume Rebalance Details (rebalance.id, rebalance.status, rebalance.failures, rebalance.skipped, rebalance.lookedup, rebalance.files, rebalance.data, rebalance.time_left)
* Volume bricks details (hostname, brickcount, subvol_count, path, status, port, filesystem_type, mount_options)
* Client details (client_count, is_arbiter, client.hostname, client.bytesread, client.byteswrite, client.opversion )
* Volume georep details (pair{idx}.master_volume, pair{idx}.slave, pair{idx}.sesion_slave, pair{idx}.master_node, pair{idx}.master_brick, pair{idx}.status, pair{idx}.slave_user, pair{idx}.slave_node, pair{idx}.crawl_status, pair{idx}.last_synced, pair{idx}.entry, pair{idx}.data, pair{idx}.meta, pair{idx}.failures, pair{idx}.checkpoint_time, pair{idx}.checkpoint_completed, pair{idx}.checkpoint_completion_time)
* volume snapshot details (snapshot{idx}.id, snapshot{idx}.name, snapshot{idx}.time, snapshot{idx}.description, snapshot{idx}.status)
2. gluster get-state volumeoptions
* Volume options (name, options.count, options.key*, options.value*)
Hope this clarifies
@shtripat
Ah, that's good. Except for the client details, everything is available as an API, although tendrl may have to call multiple APIs. There's no need for get state as separate command then.
Tendrl is a drop in management UI/API for GD1 [0]
Tendrl uses the below GD1 functionality/cli
gluster pool list
(per node)gluster get-state glusterd odir /var/run file $filename detail
(per node)gluster get-state glusterd odir /var/run file $filename volumeoptions
(per node, output of this command is intended to be used for day 1, day 2 operations)gluster volume heal $volname info split-brain --xml
(per cluster)gluster volume heal $volname info --xml
(per cluster)gluster volume profile $volname info --xml
(per cluster)gluster volume profile $volname start
(per cluster)gluster volume profile $volname stop
(per cluster)This issue will be used to document what is are must haves and good to have API in GD2 that Tendrl will consume moving on.
[0] : https://github.com/Tendrl/documentation/wiki/Tendrl-Releases