Bug 1262627 - RHEL7/systemd : can't have server in debug mode anymore
Summary: RHEL7/systemd : can't have server in debug mode anymore
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: RHGS 3.1.2
Assignee: Satish Mohan
QA Contact: Byreddy
URL:
Whiteboard: glusterd
Depends On:
Blocks: 1260783
TreeView+ depends on / blocked
 
Reported: 2015-09-13 16:44 UTC by Cedric Buissart
Modified: 2016-03-10 05:20 UTC (History)
7 users (show)

Fixed In Version: glusterfs-3.7.5-5
Doc Type: Bug Fix
Doc Text:
glusterd was not running in debug mode in RHEL7, With this fix glusterd will be configure to run in debug mode.
Clone Of:
: 1263087 (view as bug list)
Environment:
Last Closed: 2016-03-01 06:13:56 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0192 0 normal SHIPPED_LIVE Red Hat Gluster Storage 3.1 update 2 2016-03-01 10:32:25 UTC

Description Cedric Buissart 2015-09-13 16:44:06 UTC
Description of problem:

In RHEL7 / systemd, the /etc/sysconfig/glusterd file is not being read. As a consequence, we can not override options.
In particular, LOG_LEVEL would be handy.

Version-Release number of selected component (if applicable): RHGS 3.1 on RHEL7


How reproducible: 100%


Steps to Reproduce:
1. Install RHGS 3.1 on RHEL7
2. edit /etc/sysconfig/glusterd : LOG_LEVEL=TRACE
3. systemctl start glusterd.service

Actual results:
We are still in default logging level


Expected results:
debug level


Additional info:
systemd has a 'EnvironmentFile' entry that can be used to read /etc/sysconfig/glusterd.

Comment 2 Anand Nekkunti 2015-09-14 10:14:15 UTC
We need to set environment variable in service file (/usr/lib/systemd/system/glusterd.service file) 

1).Set environment variable
EnvironmentFile=/etc/sysconfig/glusterd    

2). Pass LOG_LEVEL to ExecStart
ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid $LOG_LEVEL

Comment 3 Anand Nekkunti 2015-09-15 09:34:02 UTC
Upstream patch: http://review.gluster.org/#/c/12175/

Comment 4 Anand Nekkunti 2015-09-15 09:34:13 UTC
Upstream patch: http://review.gluster.org/#/c/12175/

Comment 5 Anand Nekkunti 2015-09-15 14:14:04 UTC
Upstream patch merged.

Comment 7 Anand Nekkunti 2015-10-16 08:49:28 UTC
Downstream patch https://code.engineering.redhat.com/gerrit/#/c/59493/

Comment 8 Anand Nekkunti 2015-10-16 09:03:15 UTC
Downstream patch merged, so moving to modified

Comment 9 Byreddy 2015-11-02 04:55:42 UTC
This Bug verified with the rhgs ver: 3.1.2 ( glusterfs-3.7.5 ).

Found that Fix is working correctly and it's reading the /etc/sysconfig/glusterd file for log_level.

Step done before moving to verified state:
==========================================
1. Have one node with 3.1.2 build (glusterfs-3.7.5)
2. Edited the /etc/sysconfig/glusterd file.
 

[root@ ~]# cat /etc/sysconfig/glusterd 
## Set custom log file and log level (bellow are defaults)
LOG_FILE='/var/log/glusterfs/glusterd.log'
LOG_LEVEL='TRACE'

## Set custom options for glusterd
# GLUSTERD_OPTIONS=''
[root@ ~]# 

3. restarted the glusterd (systemctl restart glusterd.service)
4. Created one plane distributed volume
5. Checked the glusterd log, below is log details after above steps.

[2015-11-02 04:36:02.329657] I [MSGID: 100030] [glusterfsd.c:2318:main] 0-/usr/sbin/glusterd: Started running /usr/sbin/glusterd version 3.7.5 (args: /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level TRACE)

[2015-11-02 04:36:02.329774] T [MSGID: 0] [glusterfsd.c:551:create_fuse_mount] 0-glusterfsd: mount point not found, not a client process
[2015-11-02 04:36:02.331251] D [MSGID: 0] [glusterfsd.c:1984:glusterfs_pidfile_update] 0-glusterfsd: pidfile /var/run/glusterd.pid updated with pid 4751
[2015-11-02 04:36:02.331367] D [logging.c:1790:__gf_log_inject_timer_event] 0-logging-infra: Starting timer now. Timeout = 120, current buf size = 5
[2015-11-02 04:36:02.331836] D [MSGID: 0] [glusterfsd.c:638:get_volfp] 0-glusterfsd: loading volume file /etc/glusterfs/glusterd.vol
[2015-11-02 04:36:02.332607] T [graph.y:186:new_volume] 0-parser: New node for 'management'
[2015-11-02 04:36:02.332654] T [MSGID: 0] [xlator.c:189:xlator_dynload] 0-xlator: attempt to load file /usr/lib64/glusterfs/3.7.5/xlator/mgmt/glusterd.so
[2015-11-02 04:36:02.339881] T [MSGID: 0] [xlator.c:240:xlator_dynload] 0-xlator: dlsym(reconfigure) on /usr/lib64/glusterfs/3.7.5/xlator/mgmt/glusterd.so: undefined symbol: reconfigure -- neglecting
[2015-11-02 04:36:02.339942] T [graph.y:217:volume_type] 0-parser: Type:management:mgmt/glusterd

Based one above details moving this bug to verified state.

Comment 13 errata-xmlrpc 2016-03-01 06:13:56 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://rhn.redhat.com/errata/RHBA-2016-0192.html


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