summaryrefslogtreecommitdiffstats
path: root/swift/1.4.8
diff options
context:
space:
mode:
authorPeter Portante <peter.portante@redhat.com>2012-11-02 10:49:14 -0400
committerVijay Bellur <vbellur@redhat.com>2012-11-16 04:51:13 -0800
commit05cc14c2d301934d79ee37cd36f498247b7a9886 (patch)
tree36714c309e6480fa0aa022eea9d5ff4f121bb70b /swift/1.4.8
parentb696fc0e595d14404d3659bf15069addf3cf95f6 (diff)
object-storage: make proper refs to module vars
Not sure how this worked before this, but mount_ip and mount_path do not exist, their uppercase versions do. Change-Id: I53e9b550991d17b5541ed4ada5f1bc9b3cb1b8b1 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4178 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'swift/1.4.8')
-rw-r--r--swift/1.4.8/plugins/Glusterfs.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/swift/1.4.8/plugins/Glusterfs.py b/swift/1.4.8/plugins/Glusterfs.py
index 11eca56ee14..35b0c2f5938 100644
--- a/swift/1.4.8/plugins/Glusterfs.py
+++ b/swift/1.4.8/plugins/Glusterfs.py
@@ -69,9 +69,7 @@ def _busy_wait(full_mount_path):
return False
def mount(account):
- global mount_path, mount_ip
-
- full_mount_path = os.path.join(mount_path, account)
+ full_mount_path = os.path.join(MOUNT_PATH, account)
export = get_export_from_account_id(account)
pid_dir = "/var/lib/glusterd/vols/%s/run/" % export
@@ -91,7 +89,7 @@ def mount(account):
# filesystem, so wait for the mount process to complete
return _busy_wait(full_mount_path)
- mnt_cmd = 'mount -t glusterfs %s:%s %s' % (mount_ip, export, \
+ mnt_cmd = 'mount -t glusterfs %s:%s %s' % (MOUNT_IP, export, \
full_mount_path)
if os.system(mnt_cmd) or not _busy_wait(full_mount_path):
raise Exception('Mount failed %s: %s' % (NAME, mnt_cmd))
@@ -103,17 +101,15 @@ def unmount(full_mount_path):
logging.error('Unable to unmount %s %s' % (full_mount_path, NAME))
def get_export_list():
- global mount_ip
-
if REMOTE_CLUSTER:
- cmnd = 'ssh %s gluster volume info' % mount_ip
+ cmnd = 'ssh %s gluster volume info' % MOUNT_IP
else:
cmnd = 'gluster volume info'
if os.system(cmnd + ' >> /dev/null'):
if REMOTE_CLUSTER:
raise Exception('Getting volume info failed %s, make sure to have \
- passwordless ssh on %s', NAME, mount_ip)
+ passwordless ssh on %s', NAME, MOUNT_IP)
else:
raise Exception('Getting volume failed %s', NAME)