From 790cbb82a12accc99312117bfa632227c8127f53 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Tue, 19 Mar 2013 09:29:52 +0530 Subject: object-storage: Removed the redundant REMOTE_CLUSTER option. Gluster cli uses the remote-host option to connect to the glusterd and by default it uses localhost to connect to glusterd. So, UFO code will use the remote-host option everytime to connect to the glusterd. Change-Id: I5a684d3c43fe9bdc9cc0b7c472a9d8145f9e1fd4 BUG: 878663 Signed-off-by: Mohammed Junaid Reviewed-on: http://review.gluster.org/4690 Reviewed-by: Peter Portante Tested-by: Gluster Build System Reviewed-by: Anand Avati --- ufo/gluster/swift/common/Glusterfs.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'ufo/gluster/swift') diff --git a/ufo/gluster/swift/common/Glusterfs.py b/ufo/gluster/swift/common/Glusterfs.py index ce2c8e1aa..460956add 100644 --- a/ufo/gluster/swift/common/Glusterfs.py +++ b/ufo/gluster/swift/common/Glusterfs.py @@ -24,7 +24,6 @@ from gluster.swift.common.fs_utils import mkdirs # _fs_conf = ConfigParser() MOUNT_IP = 'localhost' -REMOTE_CLUSTER = False OBJECT_ONLY = False RUN_DIR='/var/run/swift' SWIFT_DIR = '/etc/swift' @@ -33,10 +32,6 @@ if _fs_conf.read(os.path.join('/etc/swift', 'fs.conf')): MOUNT_IP = _fs_conf.get('DEFAULT', 'mount_ip', 'localhost') except (NoSectionError, NoOptionError): pass - try: - REMOTE_CLUSTER = _fs_conf.get('DEFAULT', 'remote_cluster', False) in TRUE_VALUES - except (NoSectionError, NoOptionError): - pass try: OBJECT_ONLY = _fs_conf.get('DEFAULT', 'object_only', "no") in TRUE_VALUES except (NoSectionError, NoOptionError): @@ -106,19 +101,12 @@ def unmount(full_mount_path): logging.error('Unable to unmount %s %s' % (full_mount_path, NAME)) def _get_export_list(): - if REMOTE_CLUSTER: - cmnd = 'gluster --remote-host=%s volume info' % MOUNT_IP - else: - cmnd = 'gluster volume info' + cmnd = 'gluster --remote-host=%s volume info' % MOUNT_IP export_list = [] if os.system(cmnd + ' >> /dev/null'): - if REMOTE_CLUSTER: - logging.error('Getting volume info failed for %s, make sure '\ - 'gluster --remote-host=%s works', NAME, MOUNT_IP) - else: - logging.error('Getting volume info failed for %s', NAME) + logging.error('Getting volume info failed for %s', NAME) else: fp = os.popen(cmnd) while True: -- cgit