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

How to set/visualize volume options #1183

Open ghost opened 6 years ago

ghost commented 6 years ago

Observed behavior

the volume options used in glusterd do not appear to have the same name in glusterd2, i couldn't visualize them either. Example options: performance.readdir-ahead: on diagnostics.client-log-level: WARNING ...

Expected/desired behavior

glustercli volume set volname performance.readdir-ahead on and the option is set

glustercli volume info volname and some options are displayed

glustercli volume set volumename TAB completion of the option

glustercli options list to retrieve all the options

Details on how to reproduce (minimal and precise)

curl -i -X GET http://localhost:24007/v1/volumes/test01/options returns empty if no options exist

glustercli volume set test01 performance.io-thread-count 32 Volume option set failed Error: Request failed with HTTP Status code 500 Transaction step vol-option.Validate failed on peer 7a6c5914-3b72-49f6-9bf8-018e90c7d5c7 with error: Validation failed for volume option: option not found: performance.io-thread-count

Information about the environment:

Other useful information

Useful commands

vpandey-RH commented 6 years ago

@labazza

the volume options used in glusterd do not appear to have the same name in glusterd2, i couldn't visualize them either.

Yes, currently GD2 uses a different way of setting the xlator options but #816 will address this issue. But in case you are using -

curl -XPOST http://localhost:24007/v1/volumes/test01/options to set volume options, you will need to use the option names that GD2 support which you can refer to by hitting -

curl -XGET http://localhost:24007/v1/volumes/test01/options

curl -i -X GET http://localhost:24007/v1/volumes/test01/options

I am not entirely sure why you get an empty response to the above request as there are some xlator options that are set by default which should be returned as an output.

glustercli volume set test01 performance.io-thread-count 32

Please try something like - glustercli volume set io-threads.thread-count 32 --advanced

In case, I have missed out on something or you have any other issue please do notify.

ghost commented 6 years ago

hi @vpandey-RH i have successfully added the option you suggested however the GET command still returning empty as '405 Method Not Allowed':

[root@gluster1 ~]# glustercli volume set test01 io-threads.thread-count 32 --advanced                                                             
Options set successfully for test01 volume
[root@gluster1 ~]# curl -i -X GET http://localhost:24007/v1/volumes/test01/options                                                                   
HTTP/1.1 405 Method Not Allowed
X-Gluster-Cluster-Id: 83decce7-d5f4-4ac8-ba8f-1068a3483a32
X-Gluster-Peer-Id: 7a6c5914-3b72-49f6-9bf8-018e90c7d5c7
X-Request-Id: e9a8be23-670b-4f43-9a3a-421faf15aad5
Date: Mon, 20 Aug 2018 12:04:25 GMT
Content-Length: 0
Content-Type: text/plain; charset=utf-8
[root@gluster1 ~]# glustercli volume info

Volume Name: test01
Type: Replicate
Volume ID: 0b2c4aaa-24a5-40a9-87de-38c030949a06
State: Started
Transport-type: tcp
Options:
    io-threads.thread-count: 32
Number of Bricks: 3
Brick1: 10.0.2.1:/srv/gfs/test01/brk01
Brick2: gluster2:/srv/gfs/test01/brk02
Brick3: gluster3:/srv/gfs/test01/brk03

do i miss something?

vpandey-RH commented 6 years ago

@labazza Can you update your GD2 to the latest version - v4.1.0-152.git353e236 and try the above request again.

Madhu-1 commented 6 years ago

@kshlm can we get updated glusterd2 from this repo am not sure how this repo gets updated https://buildlogs.centos.org/centos/7/storage/x86_64/gluster-4.1/

kshlm commented 6 years ago

@labazza The version of GD2 you're using (v4.1.0) does not support getting just the options from ReST (GET /v1/volumes/volume/options). This was introduced in a later commit. glustercli volume info displays the options because the volume info API returns the full volinfo which contains all set options.

If you want to, you can try out the nightly rpms which have the Get options API available. Please note that GD2 is still under heavy development, and the official builds available via the distro repositories will not always be up-to-date.

atinmu commented 6 years ago

@labazza did you get a chance to test the latest nightly?

ghost commented 6 years ago

I have moved to glusterd, and been busy with that deployment. I will setup glusterd2 on a VM and continue testing. If you want this can be archived.

thanks