Open ghost opened 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
In case, I have missed out on something or you have any other issue please do notify.
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?
@labazza Can you update your GD2 to the latest version - v4.1.0-152.git353e236 and try the above request again.
@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/
@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.
@labazza did you get a chance to test the latest nightly?
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
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
uuid.toml
from all nodes (default /var/lib/glusterd2/uuid.toml)statedump
from any one of the nodeUseful commands
statedump.txt