diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2020-07-07 21:49:50 +0300 |
---|---|---|
committer | gluster-ant <bugzilla-bot@gluster.org> | 2020-07-07 21:49:50 +0300 |
commit | 081c71d7f2aac6828ac42718da3afa38b5418e37 (patch) | |
tree | 5a7eb8f00221c0bef6b32aa8d3b099182ea783d2 /tools | |
parent | 23da3f43fba0e475d7b7d4aa1be5544f067b7fe7 (diff) | |
download | glusterfs-081c71d7f2aac6828ac42718da3afa38b5418e37.tar.gz glusterfs-081c71d7f2aac6828ac42718da3afa38b5418e37.tar.xz glusterfs-081c71d7f2aac6828ac42718da3afa38b5418e37.zip |
glusterd-utils.c: display which options have changed
Display which options were not changed from the default.
The user may have opted to change some global or volume options
from the default they were initially. Display '(DEFAULT)' if the values
used are those that were not explicitly set by the user.
Example output:
Option Value
------ -----
cluster.server-quorum-ratio 50
cluster.enable-shared-storage disable (DEFAULT)
cluster.op-version 80000
cluster.max-op-version 90000
cluster.brick-multiplex disable (DEFAULT)
cluster.max-bricks-per-process 250 (DEFAULT)
glusterd.vol_count_per_thread 100 (DEFAULT)
cluster.localtime-logging disable (DEFAULT)
cluster.daemon-log-level INFO (DEFAULT)
Since glusterfind uses the value, it is now filtering the value
and only picking the 1st word (which is the value itself) and ignores
the rest, which may now be '(DEFAULT)'.
Fixes: #1357
Change-Id: I7c59055158d099a5de38943f2169fd02c77f5d09
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/glusterfind/src/utils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/glusterfind/src/utils.py b/tools/glusterfind/src/utils.py index cc099031ef..906ebd8f25 100644 --- a/tools/glusterfind/src/utils.py +++ b/tools/glusterfind/src/utils.py @@ -230,7 +230,11 @@ def get_changelog_rollover_time(volumename): try: tree = etree.fromstring(out) - return int(tree.find('volGetopts/Opt/Value').text) + val = tree.find('volGetopts/Opt/Value').text + if val is not None: + # Filter the value by split, as it may be 'X (DEFAULT)' + # and we only need 'X' + return int(val.split(' ', 1)[0]) except ParseError: return DEFAULT_CHANGELOG_INTERVAL |