conga/luci/site/luci/Extensions cluster_adapte ...
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-03-16 03:19:01
Modified files:
luci/site/luci/Extensions: cluster_adapters.py
Log message:
Fix a bug in the code that ensures FSIDs for fs and cluster fs resources are unique.
luci/site/luci/Extensions/cluster_adapters.py +4 -4
@@ -60,8 +60,8 @@ obj_list.extend(model.searchObjectTree('clusterfs')) return map(lambda x: x.getAttribute('fsid') and int(x.getAttribute('fsid')) or 0, obj_list) -def fsid_is_unique(fsid): - fsid_list = get_fsid_list +def fsid_is_unique(model, fsid): + fsid_list = get_fsid_list(model) return fsid not in fsid_list def generate_fsid(model, name):
@@ -6150,7 +6150,7 @@ if not fsid: raise Exception, 'No filesystem ID was given for this filesystem resource.' fsid_int = int(fsid) - if not fsid_is_unique(fsid_int): + if not fsid_is_unique(model, fsid_int): raise Exception, 'The filesystem ID provided is not unique.' except Exception, e: fsid = str(generate_fsid(model, name))
@@ -6267,7 +6267,7 @@ if not fsid: raise Exception, 'No filesystem ID was given for this cluster filesystem resource.' fsid_int = int(fsid) - if not fsid_is_unique(fsid_int): + if not fsid_is_unique(model, fsid_int): raise Exception, 'The filesystem ID provided is not unique.' except Exception, e: fsid = str(generate_fsid(model, name))