Bug 1322211

Summary: volume get functionality returns null value for few volume options
Product: [Community] GlusterFS Reporter: SATHEESARAN <sasundar>
Component: glusterdAssignee: Gaurav Yadav <gyadav>
Status: CLOSED EOL QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.7.9CC: amukherj, bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1323926 (view as bug list) Environment:
Last Closed: 2017-03-08 10:50:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1323926    
Attachments:
Description Flags
list of gluster volume options for which 'gluster volume get' returns null value none

Description SATHEESARAN 2016-03-30 03:03:32 UTC
Description of problem:
-----------------------
gluster volume get functionality returns a null value, even those options have a default value which is non-null value

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
gluster-3.7.9

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. Get the default value of bind-insecure and allow-insecure
# gluster volume get <vol-name> bind-insecure

Actual results:
---------------
gluster volume get returns null value for few option eventhough they have default options.
The default value of bind-insecure is off, but the volume get returns 'null' value

Expected results:
-----------------
gluster volume get should get the default value for the options

Additional info:
----------------
I have filtered out the options for which 'gluster volume get' returns null value. Few of the options the null value looks valid.
For eg, auth.reject & auth.allow -  which haven't got any values and its reasonable to display null values for those

But client.bind-insecure & server.allow-insecure has got a default values and those should be printed rather than null value


[root@dhcp37-52 ~]# gluster volume get test all | grep \(null\)
cluster.subvols-per-directory           (null)                                  
cluster.rsync-hash-regex                (null)                                  
cluster.extra-hash-regex                (null)                                  
cluster.local-volume-name               (null)                                  
cluster.switch-pattern                  (null)                                  
cluster.read-subvolume                  (null)                                  
cluster.data-self-heal-algorithm        (null)                                  
cluster.quorum-count                    (null)                                  
diagnostics.brick-logger                (null)                                  
diagnostics.client-logger               (null)                                  
diagnostics.brick-log-format            (null)                                  
diagnostics.client-log-format           (null)                                  
encryption.master-key                   (null)                                  
network.tcp-window-size                 (null)                                  
network.tcp-window-size                 (null)                                  
auth.reject                             (null)                                  
transport.keepalive                     (null)                                  
server.allow-insecure                   (null)                                  
features.grace-timeout                  (null)                                  
server.ssl                              (null)                                  
server.own-thread                       (null)                                  
ssl.own-cert                            (null)                                  
ssl.private-key                         (null)                                  
ssl.ca-list                             (null)                                  
ssl.crl-path                            (null)                                  
ssl.certificate-depth                   (null)                                  
ssl.cipher-list                         (null)                                  
ssl.dh-param                            (null)                                  
ssl.ec-curve                            (null)                                  
features.limit-usage                    (null)                                  
debug.exclude-ops                       (null)                                  
debug.include-ops                       (null)                                  
debug.error-failure                     (null)                                  
debug.error-number                      (null)                                  
debug.error-fops                        (null)                                  
nfs.exports-auth-enable                 (null)                                  
nfs.auth-refresh-interval-sec           (null)                                  
nfs.auth-cache-ttl-sec                  (null)                                  
changelog.changelog-dir                 (null)                                  
features.trash-eliminate-path           (null)                                  
locks.trace                             (null)                                  
client.bind-insecure                    (null)

Comment 1 SATHEESARAN 2016-03-30 03:04:37 UTC
[root@ ~]# gluster volume get test all | grep \(null\)
cluster.subvols-per-directory           (null)                                  
cluster.rsync-hash-regex                (null)                                  
cluster.extra-hash-regex                (null)                                  
cluster.local-volume-name               (null)                                  
cluster.switch-pattern                  (null)                                  
cluster.read-subvolume                  (null)                                  
cluster.data-self-heal-algorithm        (null)                                  
cluster.quorum-count                    (null)                                  
diagnostics.brick-logger                (null)                                  
diagnostics.client-logger               (null)                                  
diagnostics.brick-log-format            (null)                                  
diagnostics.client-log-format           (null)                                  
encryption.master-key                   (null)                                  
network.tcp-window-size                 (null)                                  
network.tcp-window-size                 (null)                                  
auth.reject                             (null)                                  
transport.keepalive                     (null)                                  
server.allow-insecure                   (null)                                  
features.grace-timeout                  (null)                                  
server.ssl                              (null)                                  
server.own-thread                       (null)                                  
ssl.own-cert                            (null)                                  
ssl.private-key                         (null)                                  
ssl.ca-list                             (null)                                  
ssl.crl-path                            (null)                                  
ssl.certificate-depth                   (null)                                  
ssl.cipher-list                         (null)                                  
ssl.dh-param                            (null)                                  
ssl.ec-curve                            (null)                                  
features.limit-usage                    (null)                                  
debug.exclude-ops                       (null)                                  
debug.include-ops                       (null)                                  
debug.error-failure                     (null)                                  
debug.error-number                      (null)                                  
debug.error-fops                        (null)                                  
nfs.exports-auth-enable                 (null)                                  
nfs.auth-refresh-interval-sec           (null)                                  
nfs.auth-cache-ttl-sec                  (null)                                  
changelog.changelog-dir                 (null)                                  
features.trash-eliminate-path           (null)                                  
locks.trace                             (null)                                  
client.bind-insecure                    (null)

Comment 2 SATHEESARAN 2016-03-30 03:06:35 UTC
Ignore the volume options listing in comment0 and comment1, as the formatting looks pretty bad and attaching the text file for the list of options

Comment 3 SATHEESARAN 2016-03-30 03:07:22 UTC
Created attachment 1141528 [details]
list of gluster volume options for which 'gluster volume get' returns null value

Comment 4 SATHEESARAN 2016-03-30 05:34:18 UTC
Apologies for incorrect statement about the default value of client.bind-insecure in comment0

The default value of bind-insecure is 'on', yet 'gluster volume get' returns the value as '(null)'

Comment 5 Atin Mukherjee 2016-03-30 05:50:48 UTC
Logic of gluster volume get functionality is as follows:

1. Code first checks for if the key is configured in volinfo->dict which indicates an explicit volume set command was triggered for this option.
2. If the key is not configured in 1, then it looks for the default value in the volume map entry table maintained by glusterd.
3. If default value is not configured in VME table in glusterd, the code loads the respective translator and checks for the default value.

In all the above three cases if the code doesn't find a match a null value is returned. 

The options what you have listed here falls into the same category as explained in the above three points and glusterd doesn't find the default value for any of them.

IMHO, the volume get logic still holds true. Until and unless the respective options are configured with default value in either VME table or the translators glusterd will continue to show null values for them.

Comment 6 SATHEESARAN 2016-03-30 08:33:48 UTC
(In reply to Atin Mukherjee from comment #5)
> Logic of gluster volume get functionality is as follows:
> 
> 1. Code first checks for if the key is configured in volinfo->dict which
> indicates an explicit volume set command was triggered for this option.
> 2. If the key is not configured in 1, then it looks for the default value in
> the volume map entry table maintained by glusterd.
> 3. If default value is not configured in VME table in glusterd, the code
> loads the respective translator and checks for the default value.
> 
> In all the above three cases if the code doesn't find a match a null value
> is returned. 
> 
> The options what you have listed here falls into the same category as
> explained in the above three points and glusterd doesn't find the default
> value for any of them.
> 
> IMHO, the volume get logic still holds true. Until and unless the respective
> options are configured with default value in either VME table or the
> translators glusterd will continue to show null values for them.

Thanks for the clean explanation.
Then it should be the corresponding translators should take care of the default value for the options.

Comment 7 Kaushal 2017-03-08 10:50:07 UTC
This bug is getting closed because GlusteFS-3.7 has reached its end-of-life.

Note: This bug is being closed using a script. No verification has been performed to check if it still exists on newer releases of GlusterFS.
If this bug still exists in newer GlusterFS releases, please reopen this bug against the newer release.