Bug 1661406 - gluster-blockd: There is no notification on changing the log-level value to ERROR and WARNING in gluster-blockd config file
Summary: gluster-blockd: There is no notification on changing the log-level value to E...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: gluster-block
Version: ocs-3.11
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: OCS 3.11.z Batch Update 3
Assignee: Prasanna Kumar Kalever
QA Contact: Neha Berry
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-21 06:59 UTC by Neha Berry
Modified: 2019-06-13 13:37 UTC (History)
11 users (show)

Fixed In Version: gluster-block-0.2.1-32.el7rhgs
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-13 13:37:24 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1409 None None None 2019-06-13 13:37:27 UTC

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
glusterfs-server-3.12.2-32.el7rhgs.x86_64
gluster-block-0.2.1-30.el7rhgs.x86_64
glusterfs-api-3.12.2-32.el7rhgs.x86_64
glusterfs-cli-3.12.2-32.el7rhgs.x86_64
python2-gluster-3.12.2-32.el7rhgs.x86_64
glusterfs-fuse-3.12.2-32.el7rhgs.x86_64
glusterfs-geo-replication-3.12.2-32.el7rhgs.x86_64
glusterfs-libs-3.12.2-32.el7rhgs.x86_64
glusterfs-3.12.2-32.el7rhgs.x86_64
glusterfs-client-xlators-3.12.2-32.el7rhgs.x86_64


sh-4.2# rpm -qa|grep tcmu-runner
tcmu-runner-1.2.0-28.el7rhgs.x86_64


sh-4.2# rpm -qa|grep rtslib     
python-rtslib-2.1.fb63-13.el7.noarch
sh-4.2#


How reproducible: 100%
===================

Steps to Reproduce:
1. Edit gluster-blockd config file: "vi /etc/sysconfig/gluster-blockd " and change the log-level value
#GB_LOG_LEVEL=INFO 
or
 GB_LOG_LEVEL=DEBUG
or
GB_LOG_LEVEL=ERROR , etc.
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.
#GB_GLFS_LRU_COUNT=5


# 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:
#GB_LOG_LEVEL=INFO


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

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:
https://github.com/gluster/gluster-block/pull/163

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.

https://access.redhat.com/errata/RHBA-2019:1409


Note You need to log in before you can comment on or make changes to this bug.