Bug 1661406

Summary: gluster-blockd: There is no notification on changing the log-level value to ERROR and WARNING in gluster-blockd config file
Product: Red Hat Gluster Storage Reporter: Neha Berry <nberry>
Component: gluster-blockAssignee: Prasanna Kumar Kalever <prasanna.kalever>
Status: CLOSED ERRATA QA Contact: Neha Berry <nberry>
Severity: medium Docs Contact:
Priority: unspecified    
Version: ocs-3.11CC: knarra, kramdoss, pasik, pkarampu, pprakash, prasanna.kalever, rhs-bugs, sankarshan, sselvan, vbellur, xiubli
Target Milestone: ---Keywords: ZStream
Target Release: OCS 3.11.z Batch Update 3   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: gluster-block-0.2.1-32.el7rhgs Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-13 13:37:24 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:

Description Neha Berry 2018-12-21 06:59:32 UTC
We observed this issue while trying to validate the fix of https://bugzilla.redhat.com/show_bug.cgi?id=1641575#c4

Description of problem:

With the introduction of dynamic reloading config feature in gluster-blockd daemon, making configuration changes, there are  messages logged stating that a certain configuration has been changed. But the "configuration change" messages are not consistent for all config changes. E.g. we see "logLevel now is ***" on chnaging levels to INFO,DEBUG,TRACE but do not see similar message on changing log level to ERROR and WARNING.

For example: 
The supported loglevels in /etc/sysconfig/gluster-blockd file are:

Supported loglevels [ NONE, ERROR, WARNING, INFO, DEBUG, TRACE ]

Following are the observations:

1. Changed log level to INFO and saw the message similar to - [2018-12-19 08:45:43.002501] INFO: logLevel now is INFO

2. Changing log level to DEBUG we saw - "[2018-12-20 13:42:57.740317] INFO: logLevel now is DEBUG "

3. Changing log level to TRACE we saw - "[2018-12-20 13:43:34.441686] INFO: logLevel now is TRACE"

4. Changing log level to ERROR - only error messages are now printed, hence change is enforced. But we didnt see "logLevel now is ERROR" or similar message

5. Changed log_level to WARNING, we will now get only Warning messages in logs. But we didnt see "logLevel now is WARNING" or similar message after the log-level was changed.

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

oc version 3.11.51 with glusterfs-template modified to unblock ourselves from BZ#1660280

OCS version - 
# oc describe ds |grep -i image
    Image:      brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/ocs/rhgs-server-rhel7:3.11.1-4

# oc describe dc heketi |grep -i image
    Image:	brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/ocs/rhgs-volmanager-rhel7:3.11.1-4

sh-4.2# rpm -qa|grep gluster

sh-4.2# rpm -qa|grep tcmu-runner

sh-4.2# rpm -qa|grep rtslib     

How reproducible: 100%

Steps to Reproduce:
1. Edit gluster-blockd config file: "vi /etc/sysconfig/gluster-blockd " and change the log-level value
2. Save the file

3. Confirm that we see messages similar to ""logLevel now is <log-level type>" once the file is saved. 

4. Confirm that we didnt have to restart the daemon to enforce the changes to config files.

4. Confirm that only the changed types of log messages are henceforth printed in /var/log/glusterfs/gluster-block/gluster-blockd.log

Actual results:
the ""logLevel now is ERROR" or "logLevel now is WARNING" messages are not printed in /var/log/glusterfs/gluster-block/gluster-blockd.log on changing corresponding log-level in /etc/sysconfig/gluster-blockd file

Expected results:

We should see above message son changing log-levels to ERROR and warning as well.

Additional info:

the default file looks like

# oc rsh glusterfs-storage-qw2kh cat /etc/sysconfig/gluster-blockd

# These options are used by the systemd gluster-blockd.service
# Any changes done here will reflect in the way systemd exec gluster-blockd
# with command arguments. See "gluster-blockd --help" output for defaults
# and possible values.

# The default cache capacity is 5 i.e there can be a max of five glfs
# entries in the lru cache, anything more will lead to release/free of
# least recently used object.

# Supported loglevels [ NONE, ERROR, WARNING, INFO, DEBUG, TRACE ]
# And the default logging level is INFO, if you want to change the
# default level, uncomment it and set your level:

# Expert use only, just incase if we have any extra args to pass for daemon

Comment 4 RamaKasturi 2019-03-29 11:21:24 UTC
Acking this one for 3.11.3

Comment 5 Prasanna Kumar Kalever 2019-04-03 11:49:30 UTC
Upstream PR:

Comment 12 errata-xmlrpc 2019-06-13 13:37:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.