summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-03-09 12:36:03 +0100
committerRob Crittenden <rcritten@redhat.com>2012-03-11 23:50:06 -0400
commit0cb9882be9dc13781fb566df11df8bb962ea1ca9 (patch)
tree19e701b475c167cefc86e05cf84d49d5623e3a66 /ipalib
parent8b2090fae68e70f0c3136fb59541617ab164fa76 (diff)
downloadfreeipa-0cb9882be9dc13781fb566df11df8bb962ea1ca9.tar.gz
freeipa-0cb9882be9dc13781fb566df11df8bb962ea1ca9.tar.xz
freeipa-0cb9882be9dc13781fb566df11df8bb962ea1ca9.zip
Fix migration plugin compat check
Ticket #2274 implements a check for compat plugin and warns user if it is enabled. However, there are 2 issues connected with the plugin: 1) The check is performed against the remote (migrated) LDAP server and not the local LDAP server, which does not make much sense 2) When the compat plugin is missing in cn=plugins,cn=config, it raises an error and thus breaks the migration This patch fixes both issues. https://fedorahosted.org/freeipa/ticket/2508
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/migration.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ipalib/plugins/migration.py b/ipalib/plugins/migration.py
index a3baf97fe..7adddb5aa 100644
--- a/ipalib/plugins/migration.py
+++ b/ipalib/plugins/migration.py
@@ -670,9 +670,13 @@ can use their Kerberos accounts.''')
#check whether the compat plugin is enabled
if not options.get('compat'):
- (dn,check_compat) = ds_ldap.get_entry(_compat_dn, normalize=False)
- if check_compat is not None and check_compat.get('nsslapd-pluginenabled', [''])[0].lower() == 'on':
- return dict(result={},failed={},enabled=True, compat=False)
+ try:
+ (dn,check_compat) = ldap.get_entry(_compat_dn, normalize=False)
+ if check_compat is not None and \
+ check_compat.get('nsslapd-pluginenabled', [''])[0].lower() == 'on':
+ return dict(result={},failed={},enabled=True, compat=False)
+ except errors.NotFound:
+ pass
if not ds_base_dn:
# retrieve base DN from remote LDAP server