Bug 1487620

Summary: [CNS-Gluster-block]: tcmu-runner logs should be configurable
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: krishnaram Karthick <kramdoss>
Component: CNS-deploymentAssignee: Saravanakumar <sarumuga>
Status: CLOSED ERRATA QA Contact: krishnaram Karthick <kramdoss>
Severity: high Docs Contact:
Priority: unspecified    
Version: cns-3.6CC: akhakhar, amukherj, annair, asriram, asrivast, hchiramm, jarrpa, madam, mliyazud, mzywusko, pprakash, prasanna.kalever, rhinduja, rhs-bugs, rreddy, rtalur, sanandpa, sarumuga, srmukher, storage-qa-internal
Target Milestone: ---   
Target Release: CNS 3.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cns-deploy-5.0.0-38.el7rhgs Doc Type: Enhancement
Doc Text:
With this update, log directory for tcmu-runner is configurable for Red Hat Gluster Storage Server container using the env variable TCMU_LOGDIR. By default, it is set to /var/log/glusterfs/gluster-block.
Story Points: ---
Clone Of: 1486541 Environment:
Last Closed: 2017-10-11 06:58:29 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: 1486541    
Bug Blocks: 1445448    

Comment 5 krishnaram Karthick 2017-09-04 09:04:14 UTC
Build cns-deploy-5.0.0-29.el7rhgs doesn't have tmcu-runner log path configurable.

Moving the bug to assigned.

Comment 6 krishnaram Karthick 2017-09-06 15:23:11 UTC
with build cns-deploy-5.0.0-30.el7rhgs, the path to tcmu-runner logs seems to have a problem.

# ps -aux | grep tcmu-runner
root   3822  0.0  0.0 380904  4004 ?Ssl  09:38   0:00 /usr/bin/tcmu-runner --tcmu-log-dir=$TCMU_LOG_DIR
root   3986  0.0  0.0   9044   660 pts/1S+   09:43   0:00 grep tcmu-runner

sh-4.2# cat /usr/lib/systemd/system/tcmu-runner.service
[Unit]
Description=LIO Userspace-passthrough daemon
Requisite=glusterd.service
BindsTo=gluster-block-target.service
Before=gluster-block-target.service

[Service]
Type=dbus
BusName=org.kernel.TCMUService1
KillMode=process
EnvironmentFile=-/etc/sysconfig/tcmu-runner-params
ExecStart=/usr/bin/tcmu-runner --tcmu-log-dir=$TCMU_LOG_DIR


sh-4.2# cat  /etc/sysconfig/tcmu-runner-params
# tcmu log directory used by tcmu-runner
TCMU_LOG_DIR='/var/log/glusterfs/gluster-block'

sh-4.2# ls -l /$TCMU_LOG_DIR
total 28
-rw-r--r--. 1 root root 26554 Sep  5 16:41 gluster-block-cli.log
sh-4.2#
sh-4.2#
sh-4.2# ls -l /var/log/glusterfs/gluster-block
total 28
-rw-r--r--. 1 root root 26554 Sep  5 16:41 gluster-block-cli.log

Saravana & Talur figured out that the variable '$TCMU_LOG_DIR' is actually replaced by the path and hence the above behavior.

sh-4.2# ls -l /\$TCMU_LOG_DIR
total 4
-rw-------. 1 root root 1168 Sep  6 09:38 tcmu-runner.log

Moving the bug back to assigned to get this fixed.

Comment 7 Humble Chirammal 2017-09-07 13:57:50 UTC
This is fixed in latest image. cns-deploy > v31 has the fix.

Comment 8 krishnaram Karthick 2017-09-12 13:57:02 UTC
tcmu-runner logs are again logged at /var/log/gluster-block directory

sh-4.2# ps -aux | grep 'tcmu'
root      2238  0.1  0.0 1539852 49092 ?       Ssl  10:16   0:21 /usr/bin/tcmu-runner --tcmu-log-dir=/var/log/gluster-block/
root     24455  0.0  0.0   9044   664 pts/0    S+   13:54   0:00 grep tcmu
sh-4.2# cat /usr/lib/systemd/system/tcmu-runner.service
[Unit]
Description=LIO Userspace-passthrough daemon
Requisite=glusterd.service
BindsTo=gluster-block-target.service
Before=gluster-block-target.service

[Service]
Type=dbus
BusName=org.kernel.TCMUService1
KillMode=process
EnvironmentFile=-/etc/sysconfig/tcmu-runner-params
ExecStart=/usr/bin/tcmu-runner --tcmu-log-dir=/var/log/gluster-block/
sh-4.2# cat  /etc/sysconfig/tcmu-runner-params
# tcmu log directory used by tcmu-runner
TCMU_LOGDIR='/var/log/glusterfs/gluster-block'
sh-4.2# ls -l /var/log/glusterfs/gluster-block
total 28
-rw-r--r--. 1 root root 26554 Sep  5 16:41 gluster-block-cli.log
sh-4.2# ls -l /var/log/gluster-block/
total 776
-rw-r--r--. 1 root root 505868 Sep 12 13:02 gluster-block-configshell.log
-rw-r--r--. 1 root root   4768 Sep 12 13:02 gluster-blockd.log
-rw-------. 1 root root 240379 Sep 12 13:56 tcmu-runner-glfs.log
-rw-------. 1 root root  16379 Sep 12 13:37 tcmu-runner.log

Comment 9 Saravanakumar 2017-09-13 10:51:53 UTC
sed command error while updating parameter in tcmu-runner.service.

Following builds should fix this:

rhgs-server-docker-3.3.0-21
cns-deploy-5.0.0-38.el7rhgs

Comment 10 Prasanth 2017-09-13 16:49:06 UTC
(In reply to Saravanakumar from comment #9)
> sed command error while updating parameter in tcmu-runner.service.
> 
> Following builds should fix this:
> 
> rhgs-server-docker-3.3.0-21
> cns-deploy-5.0.0-38.el7rhgs

Saravana, 

Please update the Fixed in Version as well.

Comment 11 Humble Chirammal 2017-09-13 16:50:37 UTC
(In reply to Prasanth from comment #10)
> (In reply to Saravanakumar from comment #9)
> > sed command error while updating parameter in tcmu-runner.service.
> > 
> > Following builds should fix this:
> > 
> > rhgs-server-docker-3.3.0-21
> > cns-deploy-5.0.0-38.el7rhgs
> 
> Saravana, 
> 
> Please update the Fixed in Version as well.

He has already mentioned it, so I am updating it.

Comment 12 krishnaram Karthick 2017-09-15 16:10:10 UTC
verified in version cns-deploy-5.0.0-38.el7rhgs.x86_64

sh-4.2# ls -l /var/log/glusterfs/gluster-block/
total 228
-rw-r--r--. 1 root root  19170 Sep 14 14:01 gluster-block-cli.log
-rw-------. 1 root root 208729 Sep 14 14:01 tcmu-runner-glfs.log
-rw-------. 1 root root    357 Sep 14 12:31 tcmu-runner.log

tcmu runner logs are logged in /var/log/glusterfs/gluster-block directory. Moving the bug to verified.

Comment 14 Raghavendra Talur 2017-10-04 15:39:59 UTC
doc text looks good to me

Comment 15 errata-xmlrpc 2017-10-11 06:58:29 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/RHEA-2017:2877