summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-03-20 12:33:09 +0100
committerSage Weil <sage@inktank.com>2013-04-26 13:40:05 -0700
commitb9f86d96f5dd6ca18eb39882caf69e76369b5e0b (patch)
tree09e5366f122422baf2b1272eaf4484849b80b8b3
parent6fa6cd85b55935739e16b8ba537f7848dbb0218f (diff)
downloadceph-b9f86d96f5dd6ca18eb39882caf69e76369b5e0b.tar.gz
fix: Redefining name 'uuid' from outer scope (line 14)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit d3c60dc8cad1db1d5df1c740bc805aaf9ba606ba)
-rwxr-xr-xsrc/ceph-disk20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index 4c545f05aee..250ee13258e 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -418,10 +418,10 @@ def get_fsid(cluster):
def get_or_create_dmcrypt_key(
- uuid,
+ _uuid,
key_dir,
):
- path = os.path.join(key_dir, uuid)
+ path = os.path.join(key_dir, _uuid)
# already have it?
if os.path.exists(path):
@@ -443,16 +443,16 @@ def get_or_create_dmcrypt_key(
def dmcrypt_map(
rawdev,
keypath,
- uuid,
+ _uuid,
):
- dev = '/dev/mapper/'+ uuid
+ dev = '/dev/mapper/'+ _uuid
args = [
'cryptsetup',
'--key-file',
keypath,
'--key-size', '256',
'create',
- uuid,
+ _uuid,
rawdev,
]
try:
@@ -464,19 +464,19 @@ def dmcrypt_map(
def dmcrypt_unmap(
- uuid
+ _uuid
):
args = [
'cryptsetup',
'remove',
- uuid
+ _uuid
]
try:
subprocess.check_call(args)
except subprocess.CalledProcessError as e:
- raise Error('unable to unmap device', uuid)
+ raise Error('unable to unmap device', _uuid)
def mount(
@@ -1335,7 +1335,7 @@ def activate_dir(
return (cluster, osd_id)
-def find_cluster_by_uuid(uuid):
+def find_cluster_by_uuid(_uuid):
"""
Find a cluster name by searching /etc/ceph/*.conf for a conf file
with the right uuid.
@@ -1350,7 +1350,7 @@ def find_cluster_by_uuid(uuid):
u = get_conf(cluster, 'fsid')
if u is None:
no_fsid.append(cluster)
- elif u == uuid:
+ elif u == _uuid:
return cluster
# be tolerant of /etc/ceph/ceph.conf without an fsid defined.
if len(no_fsid) == 1 and no_fsid[0] == 'ceph':