Bug 1378057 - glusterd fails to start without installing glusterfs-events package
Summary: glusterd fails to start without installing glusterfs-events package
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: eventsapi
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Aravinda VK
QA Contact:
URL:
Whiteboard:
Depends On: 1378030
Blocks: 1380252
TreeView+ depends on / blocked
 
Reported: 2016-09-21 12:19 UTC by Aravinda VK
Modified: 2017-03-06 17:26 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.10.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1378030
: 1380252 (view as bug list)
Environment:
Last Closed: 2017-03-06 17:26:53 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Aravinda VK 2016-09-21 12:19:44 UTC
+++ This bug was initially created as a clone of Bug #1378030 +++

Description of problem:
-----------------------
I installed glusterfs-server and glusterd failed to start.
After install glusterfs-events package, glusterd started normally

Steps to Reproduce:
-------------------
1. Install glusterfs-server package
2. Start glusterd

Actual results:
---------------
glusterd failed to start

Expected results:
-----------------


Error from glusterd.log

<snip>
[2016-09-21 09:59:42.606761] D [MSGID: 0] [glusterd-utils.c:6373:glusterd_sm_tr_log_init] 0-glusterd: returning 0
[2016-09-21 09:59:42.606776] D [MSGID: 0] [glusterd.c:1721:init] 0-management: cannot get run-with-valgrind value
[2016-09-21 09:59:42.665672] E [MSGID: 106229] [glusterd.c:456:glusterd_check_gsync_present] 0-glusterd: geo-replication module not working as desired
[2016-09-21 09:59:42.665784] D [MSGID: 0] [glusterd.c:466:glusterd_check_gsync_present] 0-glusterd: Returning -1
[2016-09-21 09:59:42.665819] E [MSGID: 101019] [xlator.c:433:xlator_init] 0-management: Initialization of volume 'management' failed, review your volfile again
[2016-09-21 09:59:42.665833] E [MSGID: 101066] [graph.c:324:glusterfs_graph_init] 0-management: initializing translator failed
[2016-09-21 09:59:42.665845] E [MSGID: 101176] [graph.c:673:glusterfs_graph_activate] 0-graph: init failed
[2016-09-21 09:59:42.666266] D [logging.c:1765:gf_log_flush_extra_msgs] 0-logging-infra: Log buffer size reduced. About to flush 5 extra log messages
[2016-09-21 09:59:42.666289] D [logging.c:1768:gf_log_flush_extra_msgs] 0-logging-infra: Just flushed 5 extra log messages
[2016-09-21 09:59:42.666501] W [glusterfsd.c:1288:cleanup_and_exit] (-->/usr/sbin/glusterd(glusterfs_volumes_init+0xfd) [0x7f8b772d169d] -->/usr/sbin/glusterd(glusterfs_process_volfp+0x172) [0x7f8b772d1542] -->/usr/sbin/glusterd(cleanup_and_exit+0x6b) [0x7f8b772d0abb] ) 0-: received signum (1), shutting down
</snip>

--- Additional comment from SATHEESARAN on 2016-09-21 07:15 EDT ---



--- Additional comment from SATHEESARAN on 2016-09-21 07:18:14 EDT ---

One more issue seen in a scenario, where 'glusterd' is not running and 'glusterfs-events' package is not installed.

I see a traceback in the following scenario :

# gluster pe s
Traceback (most recent call last):
  File "/usr/libexec/glusterfs/python/syncdaemon/gsyncd.py", line 29, in <module>
    from syncdutils import FreeObject, norm, grabpidfile, finalize
  File "/usr/libexec/glusterfs/python/syncdaemon/syncdutils.py", line 28, in <module>
    from events import eventtypes
ImportError: No module named events
peer status: failed
Connection failed. Please check if gluster daemon is operational.

--- Additional comment from SATHEESARAN on 2016-09-21 07:20:51 EDT ---

As a workaround to this, one need to install glusterfs-events package along with python-gluster package.

--- Additional comment from Aravinda VK on 2016-09-21 07:33:08 EDT ---

RCA:

Geo-rep/Snap scheduler imports eventtypes.py but that file is packaged under glusterfs-events rpm. During glusterd/gluster cli invocation, call to `/usr/libexec/glusterfs/gsyncd --version` is failing with Python traceback.

To fix the issue, conditionally enable flag in Geo-rep code if events is not installed by guarding the import.

EVENTS_ENABLED = True
try:
    from events import eventtypes
except ImportError:
    EVENTS_ENABLED = False

And check this flag while calling gf_event.

--- Additional comment from SATHEESARAN on 2016-09-21 07:46:19 EDT ---

I have raised this bug with the understanding that glusterfs-events package is required for glusterfs-server package. That is the reason in comment0, I expected that glusterfs-server package to glusterfs-events.

Later understood the fact that the glusterfs-events will be installed only if there is a requirement.

So the expected result is that glusterd should start without installing glusterfs-events package

Comment 1 Worker Ant 2016-09-21 12:21:47 UTC
REVIEW: http://review.gluster.org/15539 (eventsapi/geo-rep: Geo-rep will not work without eventsapi rpms) posted (#1) for review on master by Aravinda VK (avishwan@redhat.com)

Comment 2 Worker Ant 2016-09-29 06:22:32 UTC
COMMIT: http://review.gluster.org/15539 committed in master by Aravinda VK (avishwan@redhat.com) 
------
commit 567dee257e092401cdf0a62d4b89e13c39a0a5aa
Author: Aravinda VK <avishwan@redhat.com>
Date:   Wed Sep 21 17:43:00 2016 +0530

    eventsapi/geo-rep: Geo-rep will not work without eventsapi rpms
    
    If glusterfs-events rpm is not installed, Geo-replication will
    fail since it imports eventtypes.
    
    Any call to gsyncd will fail with Import error. Glusterd start
    fails since it runs `gsyncd.py --version`
    
    Traceback (most recent call last):
      File "/usr/libexec/glusterfs/python/syncdaemon/gsyncd.py",
        line 29, in <module>
          from syncdutils import FreeObject, norm, grabpidfile, finalize
      File "/usr/libexec/glusterfs/python/syncdaemon/syncdutils.py",
        line 28, in <module>
          from events import eventtypes
    ImportError: No module named events
    
    BUG: 1378057
    Change-Id: I1a9bc086c3d52449ec7296cb2f9ceb16cd41a8a4
    Signed-off-by: Aravinda VK <avishwan@redhat.com>
    Reviewed-on: http://review.gluster.org/15539
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
    Reviewed-by: Kotresh HR <khiremat@redhat.com>

Comment 3 Shyamsundar 2017-03-06 17:26:53 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.10.0, please open a new bug report.

glusterfs-3.10.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/gluster-users/2017-February/030119.html
[2] https://www.gluster.org/pipermail/gluster-users/


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