summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Junaid <junaid@redhat.com>2013-03-19 09:29:52 +0530
committerAnand Avati <avati@redhat.com>2013-03-21 14:07:27 -0700
commit790cbb82a12accc99312117bfa632227c8127f53 (patch)
tree2c7e4719ac57e256964adbf29a71645b9f43fb11
parent5d19cddd601b2819d2ea908961c7ea9835beccc7 (diff)
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 <junaid@redhat.com> Reviewed-on: http://review.gluster.org/4690 Reviewed-by: Peter Portante <pportant@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--ufo/etc/fs.conf-gluster4
-rw-r--r--ufo/gluster/swift/common/Glusterfs.py16
-rw-r--r--ufo/test/unit/common/test_ring.py2
3 files changed, 3 insertions, 19 deletions
diff --git a/ufo/etc/fs.conf-gluster b/ufo/etc/fs.conf-gluster
index bbbdc2bd10d..54822a43c4e 100644
--- a/ufo/etc/fs.conf-gluster
+++ b/ufo/etc/fs.conf-gluster
@@ -3,10 +3,6 @@
# local host.
mount_ip = localhost
-# The GlusterFS server need not be local, a remote server can also be used
-# by setting "remote_cluster = yes".
-remote_cluster = no
-
# By default it is assumed the Gluster volumes can be accessed using other
# methods besides UFO (not object only), which disables a caching
# optimizations in order to keep in sync with file system changes.
diff --git a/ufo/gluster/swift/common/Glusterfs.py b/ufo/gluster/swift/common/Glusterfs.py
index ce2c8e1aa59..460956add78 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'
@@ -34,10 +33,6 @@ if _fs_conf.read(os.path.join('/etc/swift', 'fs.conf')):
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):
pass
@@ -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:
diff --git a/ufo/test/unit/common/test_ring.py b/ufo/test/unit/common/test_ring.py
index d3dac609c59..4fb964e4250 100644
--- a/ufo/test/unit/common/test_ring.py
+++ b/ufo/test/unit/common/test_ring.py
@@ -38,6 +38,6 @@ class TestRing(unittest.TestCase):
assert node[0]['device'] == 'test'
part, node = self.ring.get_nodes('test2')
assert node
- assert node[0]['device'] == 'volume'
+ assert node[0]['device'] == 'volume_not_in_ring'
finally:
self.ring._devs = __devs