Bug 1233411 - [geo-rep]: UnboundLocalError: local variable 'fd' referenced before assignment
Summary: [geo-rep]: UnboundLocalError: local variable 'fd' referenced before assignment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: geo-replication
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kotresh HR
QA Contact:
URL:
Whiteboard:
Depends On: 1232216
Blocks: 1240607
TreeView+ depends on / blocked
 
Reported: 2015-06-18 20:14 UTC by Kotresh HR
Modified: 2016-06-16 13:14 UTC (History)
9 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of: 1232216
: 1240607 (view as bug list)
Environment:
Last Closed: 2016-06-16 13:14:28 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Kotresh HR 2015-06-18 20:14:46 UTC
+++ This bug was initially created as a clone of Bug #1232216 +++

Description of problem:
=======================

Happened to see the below traceback in the geo-rep log with the use of meta_volume.

[2015-06-16 20:11:43.911356] I [master(/bricks/brick1/master_brick2):528:crawlwrap] _GMaster: crawl interval: 1 seconds
[2015-06-16 20:11:43.912364] I [master(/bricks/brick0/master_brick0):519:crawlwrap] _GMaster: primary master with volume id a6de699b-83c5-4747-95a7-81c36f5d79c6 ...
[2015-06-16 20:11:43.917547] I [master(/bricks/brick0/master_brick0):528:crawlwrap] _GMaster: crawl interval: 1 seconds
[2015-06-16 20:11:43.918723] I [master(/bricks/brick1/master_brick2):455:mgmt_lock] _GMaster: Creating geo-rep directory in meta volume...
[2015-06-16 20:11:43.923168] I [master(/bricks/brick0/master_brick0):455:mgmt_lock] _GMaster: Creating geo-rep directory in meta volume...
[2015-06-16 20:11:43.938770] E [syncdutils(/bricks/brick0/master_brick0):276:log_raise_exception] <top>: FAIL: 
Traceback (most recent call last):
  File "/usr/libexec/glusterfs/python/syncdaemon/gsyncd.py", line 165, in main
    main_i()
  File "/usr/libexec/glusterfs/python/syncdaemon/gsyncd.py", line 659, in main_i
    local.service_loop(*[r for r in [remote] if r])
  File "/usr/libexec/glusterfs/python/syncdaemon/resource.py", line 1438, in service_loop
    g3.crawlwrap(oneshot=True)
  File "/usr/libexec/glusterfs/python/syncdaemon/master.py", line 531, in crawlwrap
    crawl = self.should_crawl()
  File "/usr/libexec/glusterfs/python/syncdaemon/master.py", line 485, in should_crawl
    return self.mgmt_lock()
  File "/usr/libexec/glusterfs/python/syncdaemon/master.py", line 469, in mgmt_lock
    os.close(fd)
UnboundLocalError: local variable 'fd' referenced before assignment
[2015-06-16 20:11:43.941852] I [syncdutils(/bricks/brick0/master_brick0):220:finalize] <top>: exiting.
[2015-06-16 20:11:43.945887] I [repce(agent):92:service_loop] RepceServer: terminating on reaching EOF.
[2015-06-16 20:11:43.946471] I [syncdutils(agent):220:finalize] <top>: exiting.

Comment 1 Anand Avati 2015-06-18 20:22:43 UTC
REVIEW: http://review.gluster.org/11318 (geo-rep: Fix fd referenced before assignment) posted (#1) for review on master by Kotresh HR (khiremat@redhat.com)

Comment 2 Anand Avati 2015-06-30 06:58:08 UTC
REVIEW: http://review.gluster.org/11318 (geo-rep: Fix fd referenced before assignment) posted (#2) for review on master by Kotresh HR (khiremat@redhat.com)

Comment 3 Anand Avati 2015-07-06 06:50:56 UTC
COMMIT: http://review.gluster.org/11318 committed in master by Venky Shankar (vshankar@redhat.com) 
------
commit 33935401cc548b55afc8ed907e54f72ff3e567b4
Author: Kotresh HR <khiremat@redhat.com>
Date:   Fri Jun 19 01:41:27 2015 +0530

    geo-rep: Fix fd referenced before assignment
    
    Fix fd reference before assignment in mgmt_lock
    function.
    
    Change-Id: Ie939d4262a59cae0817ae388658a000576ab69b8
    BUG: 1233411
    Signed-off-by: Kotresh HR <khiremat@redhat.com>
    Reviewed-on: http://review.gluster.org/11318
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Aravinda VK <avishwan@redhat.com>

Comment 4 Nagaprasad Sathyanarayana 2015-10-25 15:03:38 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 5 Niels de Vos 2016-06-16 13:14:28 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.8.0, please open a new bug report.

glusterfs-3.8.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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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