Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

How to set/visualize volume options #1183

Open
ghost opened this issue Aug 17, 2018 · 7 comments
Open

How to set/visualize volume options #1183

ghost opened this issue Aug 17, 2018 · 7 comments

Comments

@ghost
Copy link

ghost commented Aug 17, 2018

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:

  • Glusterd2 version used (e.g. v4.1.0 or master): {"glusterd-version":"v4.1.0-0","api-version":1}

  • Operating system used: centos 7.5.1804

  • Glusterd2 compiled from sources, as a package (rpm/deb), or container: from repo: https://buildlogs.centos.org/centos/7/storage/x86_64/gluster-4.1/

  • Using External ETCD: (yes/no, if yes ETCD version): no

  • If container, which container image:

  • Using kubernetes, openshift, or direct install:

  • If kubernetes/openshift, is gluster running inside kubernetes/openshift or outside:

Other useful information

  • glusterd2 config files from all nodes (default /etc/glusterd2/glusterd2.toml)
  • glusterd2 log files from all nodes (default /var/log/glusterd2/glusterd2.log)
    the other thing is that there is nothing related to API calls in /var/log/glusterd2/glusterd2.log
  • ETCD configuration
  • Contents of uuid.toml from all nodes (default /var/lib/glusterd2/uuid.toml)
  • Output of statedump from any one of the node

Useful commands

  • To get glusterd2 version
    glusterd2 --version
    
  • To get ETCD version
    etcd --version
    
  • To get output of statedump
    curl http://glusterd2-IP:glusterd2-Port/statedump
    

statedump.txt

@vpandey-RH
Copy link
Contributor

@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
Copy link
Author

ghost commented Aug 20, 2018

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
Copy link
Contributor

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

@Madhu-1
Copy link
Member

Madhu-1 commented Aug 20, 2018

@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
Copy link
Member

kshlm commented Aug 20, 2018

@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
Copy link
Contributor

atinmu commented Sep 14, 2018

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

@ghost
Copy link
Author

ghost commented Sep 14, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants