From: rread Date: Sat, 19 Apr 2003 01:07:24 +0000 (+0000) Subject: b=1075 X-Git-Tag: v1_7_100~1^101~35 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=37d49aab491109bd5ddeb507fd6c39c10e9da14f;p=fs%2Flustre-release.git b=1075 The config part of failback. Lconf now supports --group for setup and cleanup. If --group is used, lconf will only setup/cleanup the devices that are in the group AND are currently active on this node. Lconf will still setup the modules needed by the devices (networking, routing), but cleanup will leave these untouched if there are still other devices left after cleaning up the group. * small fix enable config version support in ldap --- diff --git a/lustre/utils/Lustre/lustredb.py b/lustre/utils/Lustre/lustredb.py index c591f72..784a63e 100644 --- a/lustre/utils/Lustre/lustredb.py +++ b/lustre/utils/Lustre/lustredb.py @@ -118,6 +118,9 @@ class LustreDB: def update_active(self, tgtuuid, new_uuid): self._update_active(tgtuuid, new_uuid) + def get_version(self): + return self.get_val('version') + class LustreDB_XML(LustreDB): def __init__(self, dom, root_node): # init xmlfile @@ -289,9 +292,14 @@ class LustreDB_LDAP(LustreDB): # user and pw only needed if modifying db self.l.bind_s(self._user, self._pw, ldap.AUTH_SIMPLE); except ldap.LDAPError, e: - raise LconfError(e) - # FIXME, do something useful here + raise Lustre.LconfError('Unable to connection to ldap server') + try: + self._name, self._attrs = self.l.search_s(self._base, + ldap.SCOPE_BASE)[0] + except ldap.LDAPError, e: + raise Lustre.LconfError("no config found in ldap: %s" + % (self._base,)) def close(self): self.l.unbind_s() @@ -397,5 +405,3 @@ class LustreDB_LDAP(LustreDB): except ldap.LDAPError, e: print e # FIXME: die here? return - -