Design and implement volume set functionality #266
Comments
We also need to set rules on naming options to avoid situations where multiple options have the same key. |
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 |
On Thu, Jun 29, 2017 at 12:35 PM, Prashanth Pai ***@***.***> wrote:
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.
***@***.*** xlator-sym-go]$ ./main /usr/local/lib/glusterfs/3.12dev/xlator | head -n 100
hehe cute hack! :)
|
Like it 👍 |
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.
|
Awesome |
A patch has been posted to glusterfs that fixes this. |
The following PRs implements this functionality: |
And also provide flexible way to define and validate rules for volume set keys.
The text was updated successfully, but these errors were encountered: