gluster / glusterd2

[DEPRECATED] Glusterd2 is the distributed management framework to be used for GlusterFS.
GNU General Public License v2.0
167 stars 82 forks source link

Tendrl requirements for GD2 [WIP] #716

Open r0h4n opened 6 years ago

r0h4n commented 6 years ago

Tendrl is a drop in management UI/API for GD1 [0]

Tendrl uses the below GD1 functionality/cli

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

r0h4n commented 6 years ago

@atinmu @prashanthpai @shirshendu @shtripat

prashanthpai commented 6 years ago

@atinmu

Current state of things:

This is present today as a consumable REST API. And you don't have to run it per node.

@r0h4n I need some more information on what (fields/data) do you consume in getstate output.

Heal commands implementation is under progress and the PR is under review.

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.

atinmu commented 6 years ago

@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.

atinmu commented 6 years ago

Events API integration https://github.com/gluster/glusterd2/issues/418 would also be a dependency for this integration.

shtripat commented 6 years ago

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

prashanthpai commented 6 years ago

@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.