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

Design and implement volume set functionality #266

Closed
prashanthpai opened this issue Feb 27, 2017 · 9 comments
Closed

Design and implement volume set functionality #266

prashanthpai opened this issue Feb 27, 2017 · 9 comments

Comments

@prashanthpai
Copy link
Contributor

And also provide flexible way to define and validate rules for volume set keys.

@prashanthpai prashanthpai added this to TODO: Volume Management in GlusterD-2.0 Rogue One Feb 27, 2017
@kshlm kshlm added this to the Release Rogue One milestone Feb 28, 2017
@kshlm
Copy link
Member

kshlm commented Feb 28, 2017

We also need to set rules on naming options to avoid situations where multiple options have the same key.

@prashanthpai
Copy link
Contributor Author

To avoid xlator authors having to modify glusterd2 code to let glusterd2 know about xlator options, we can read the symbols in xlator's shared object from go (with caveats). Here's a sample program that demonstrates that.

[ppai@gd2-1 xlator-sym-go]$ ./main /usr/local/lib/glusterfs/3.12dev/xlator | head -n 100

/usr/local/lib/glusterfs/3.12dev/xlator/cluster/afr.so
read-subvolume
read-subvolume-index
read-hash-mode
choose-local
favorite-child
background-self-heal-count
halo-shd-max-latency
halo-enabled
halo-nfsd-max-latency
halo-max-latency
halo-max-replicas
halo-min-replicas
heal-wait-queue-length
data-self-heal
data-self-heal-algorithm
data-self-heal-window-size
metadata-self-heal
entry-self-heal
data-change-log
metadata-change-log
entry-change-log
optimistic-change-log
inodelk-trace
entrylk-trace
pre-op-compat
eager-lock
self-heal-daemon
iam-self-heal-daemon
iam-nfs-daemon
quorum-type
quorum-count
quorum-reads
node-uuid
post-op-delay-secs
self-heal-readdir-size
ensure-durability
afr-dirty-xattr
afr-pending-xattr
metadata-splitbrain-forced-heal
heal-timeout
consistent-metadata
arbiter-count
shd-max-threads
shd-wait-qlength
locking-scheme
granular-entry-heal
favorite-child-policy
consistent-io
use-compound-fops

/usr/local/lib/glusterfs/3.12dev/xlator/cluster/dht.so
lookup-unhashed
lookup-optimize
min-free-disk
min-free-inodes
unhashed-sticky-bit
use-readdirp
assert-no-child-down
directory-layout-spread
decommissioned-bricks
rebalance-cmd
commit-hash
node-uuid
rebalance-stats
readdir-optimize
rsync-hash-regex
extra-hash-regex
rebalance-filter
xattr-name
weighted-rebalance
local-volume-name
tier-pause
tier-promote-frequency
tier-demote-frequency
write-freq-threshold
read-freq-threshold
watermark-hi
watermark-low
tier-mode
tier-compact
tier-hot-compact-frequency
tier-cold-compact-frequency
tier-max-mb
tier-max-promote-file-size
tier-max-files
tier-query-limit
pattern.switch.case
randomize-hash-range-by-gfid
rebal-throttle
lock-migration

/usr/local/lib/glusterfs/3.12dev/xlator/cluster/disperse.so
redundancy
self-heal-daemon
iam-self-heal-daemon
eager-lock
background-heals
heal-wait-qlength

@purpleidea
Copy link

purpleidea commented Jun 29, 2017 via email

@amarts
Copy link
Member

amarts commented Jun 29, 2017

Like it 👍

@aravindavk
Copy link
Member

Nice. Is it possible to extract the default values and datatype from .so files? (For validations and for volfile gen)

@prashanthpai
Copy link
Contributor Author

Nice. Is it possible to extract the default values and datatype from .so files? (For validations and for volfile gen)

Yes. In the example above, I have printed just the key, but the entire volume_option_t struct is available.

Using cgo, has it's own caveats though but for our basic purposes it should work fine.
dlopen() fails for certain xlators. I'll see what can be done there.

dlopen(/usr/local/lib/glusterfs/3.12dev/xlator/mount/fuse.so) failed; dlerror = /usr/local/lib/glusterfs/3.12dev/xlator/mount/fuse.so: undefined symbol: gf_fop_list

@aravindavk
Copy link
Member

Yes. In the example above, I have printed just the key, but the entire volume_option_t struct is available.

Awesome

@prashanthpai
Copy link
Contributor Author

dlopen() fails for certain xlators. I'll see what can be done there.

dlopen(/usr/local/lib/glusterfs/3.12dev/xlator/mount/fuse.so) failed; dlerror = > /usr/local/lib/glusterfs/3.12dev/xlator/mount/fuse.so: undefined symbol: gf_fop_list

A patch has been posted to glusterfs that fixes this.

@prashanthpai
Copy link
Contributor Author

@prashanthpai prashanthpai moved this from TODO: Volume Management to Done in GlusterD-2.0 Rogue One Oct 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

5 participants