Red Hat Bugzilla – Bug 1477547
Gluster block should have log file path configurable
Last modified: 2017-09-21 00:20:54 EDT
Description of problem:
Gluster block should have log file path configurable.
In case of CNS we have to have separate two templates to support gluster-block and non gluster-block setup. If this option is configurable then we can configure the path of log file and use the pre-existing template to log for gluster-block also. This will also reduce the transition model, if some user wants to use gluster-block at some point of time.
Please note how it has been tested on the gluster-block side.
1. The environment variable GB_LOGDIR is set on the CLI(shell) side as well as for the daemon.
* CLI(shell): export GB_LOGDIR=/var/log/glusterfs/gluster-block
* Daemon: echo "GB_LOGDIR=/var/log/glusterfs/gluster-block" >> /etc/sysconfig/gluster-blockd
2. systemctl restart gluster-blockd
3 "ps eww <gluster-block-pid>" should show the new variable GB_LOGDIR and its value
The log files do show up in the new location /var/log/glusterfs/gluster-block.
Case1: However all the old configuration related to old blocks continue to get logged in the old location '/var/log/gluster-block'.
I suppose this is expected as it is the nature of tcmu-runner logging. And I suppose this will not be hit in CNS if we are going to start it afresh with GB_LOGDIR correctly set.
Case2: I am setting the environment variable twice, for CLI as well as daemon. Doing just one of the two will log some files in the old location and some files in the new location. Please confirm if this is taken care of in the CNS environment.
@Raghavendra, please do write if any other scenarios need to be tested with this. Will be moving this bug to verified if you ack the concerns raised in Case1 and Case2.
All log files should get logged under /var/log/glusterfs/gluster-block if it is a clean setup is what prasanna told me. Sweta, did you upgrade the setup from a previous version, if so that all old blocks that were created will continue to log to /var/log/gluster-block.
Can you try on a fresh setup and verify please?
Moving it to ASSIGNED as tcmu-runner logs continue to get copied in the older location '/var/log/gluster-block'
Raised BZ 1486541 as per Comment 19. Moving the present BZ to verified in RHGS 3.3.0.
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.