Bug 902213

Summary: "gluster volume geo-replication .. config" with an incorrect hostname for the source gives a DeprecationWarning
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Vidya Sakar <vinaraya>
Component: geo-replicationAssignee: Niels de Vos <ndevos>
Status: CLOSED ERRATA QA Contact: Vijaykumar Koppad <vkoppad>
Severity: low Docs Contact:
Priority: medium    
Version: 2.0CC: aavati, amarts, ashetty, bbandari, csaba, fharshav, gluster-bugs, ndevos, rfortier, rhs-bugs, shaines
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.3.0.5rhs-43 Doc Type: Bug Fix
Doc Text:
Cause: Python 2.6 has deprecated the usage of the .message attribute. Whenever this attribute is accessed, the Python runtime will print a warning like this: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 Consequence: This DeprecationWarning can get displayed by all processes that use the syncdutils.py (part of geo-replication) library. Common occurrences are while updating the glusterfs-geo-replication package, or executing geo-replication commands with an unresolvable hostname. Fix: Instead of accessing the .message attribute from an Exception, use the .args[] array as done in other parts of the Python code. Result: Not accessing the .message attribute prevents the DeprecationWarnings from occurring.
Story Points: ---
Clone Of: 888346 Environment:
Last Closed: 2013-03-28 22:28:43 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: 888346    
Bug Blocks: 888352    

Description Vidya Sakar 2013-01-21 07:31:39 UTC
+++ This bug was initially created as a clone of Bug #888346 +++

Description of problem:


# gluster volume geo-replication source ssh://root@vm-104x::target config
/usr/libexec/glusterfs/python/syncdaemon/syncdutils.py:175: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  sys.stderr.write('failure: ' + exc.message + "\n")
failure: failed to resolve vm-104x: Name or service not known
geo-replication command failed


The hostname is incorrect, and "Name or service not known" should be displayed without the DeprecationWarning.

--- Additional comment from Niels de Vos on 2012-12-18 09:37:31 EST ---

Posted as http://review.gluster.org/4328

--- Additional comment from Vijay Bellur on 2012-12-18 17:17:49 EST ---

CHANGE: http://review.gluster.org/4328 (geo-rep: do not access BaseException.message in syncdutils) merged in master by Anand Avati (avati)

Comment 3 Scott Haines 2013-02-18 18:11:01 UTC
Per 02/18 program call, agreed to target for Anshi release.

Comment 4 Niels de Vos 2013-02-20 09:16:24 UTC
*** Bug 885586 has been marked as a duplicate of this bug. ***

Comment 5 Niels de Vos 2013-02-20 09:18:06 UTC
*** Bug 888352 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2013-03-28 22:28:43 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.

http://rhn.redhat.com/errata/RHSA-2013-0691.html