Bug 1262627 - RHEL7/systemd : can't have server in debug mode anymore
RHEL7/systemd : can't have server in debug mode anymore
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterd (Show other bugs)
3.1
Unspecified Unspecified
unspecified Severity medium
: ---
: RHGS 3.1.2
Assigned To: Satish Mohan
Byreddy
glusterd
: ZStream
Depends On:
Blocks: 1260783
  Show dependency treegraph
 
Reported: 2015-09-13 12:44 EDT by Cedric Buissart
Modified: 2016-03-10 00:20 EST (History)
7 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 1263087 (view as bug list)
Environment:
Last Closed: 2016-03-01 01:13:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Cedric Buissart 2015-09-13 12:44:06 EDT
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 06:14:15 EDT
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 05:34:02 EDT
Upstream patch: http://review.gluster.org/#/c/12175/
Comment 4 Anand Nekkunti 2015-09-15 05:34:13 EDT
Upstream patch: http://review.gluster.org/#/c/12175/
Comment 5 Anand Nekkunti 2015-09-15 10:14:04 EDT
Upstream patch merged.
Comment 7 Anand Nekkunti 2015-10-16 04:49:28 EDT
Downstream patch https://code.engineering.redhat.com/gerrit/#/c/59493/
Comment 8 Anand Nekkunti 2015-10-16 05:03:15 EDT
Downstream patch merged, so moving to modified
Comment 9 Byreddy 2015-11-01 23:55:42 EST
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 01:13:56 EST
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.