diff options
author | Tomas Krizek <tkrizek@redhat.com> | 2016-10-26 16:08:43 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-11-07 11:34:03 +0100 |
commit | a77469f5984b12e201a3d349efad1ca2925ee5af (patch) | |
tree | 4f249becda6d27fb6bd171713eb5e7ad0f8a7c40 /ipaserver/install/dsinstance.py | |
parent | e05bdeb6cf4505ef84e485b95b37aabba625160b (diff) | |
download | freeipa-a77469f5984b12e201a3d349efad1ca2925ee5af.tar.gz freeipa-a77469f5984b12e201a3d349efad1ca2925ee5af.tar.xz freeipa-a77469f5984b12e201a3d349efad1ca2925ee5af.zip |
install: remove adhoc api.Backend.ldap2 (dis)connect
Remove adhoc connects and disconnects of api.Backend.ldap2. Connection
should be established only at the start of the script, destroyed at the
end of the script and re-established when directory server is restarted.
https://fedorahosted.org/freeipa/ticket/6461
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver/install/dsinstance.py')
-rw-r--r-- | ipaserver/install/dsinstance.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py index 5d1830268..2e5e12ae0 100644 --- a/ipaserver/install/dsinstance.py +++ b/ipaserver/install/dsinstance.py @@ -1193,7 +1193,6 @@ class DsInstance(service.Service): if ds_is_running: try: - api.Backend.ldap2.connect(autobind=True) ret = api.Command['config_show']() subject_base = str( ret['result']['ipacertificatesubjectbase'][0]) @@ -1202,11 +1201,6 @@ class DsInstance(service.Service): except errors.PublicError as e: root_logger.error('Cannot connect to DS to find certificate ' 'subject base: %s', e) - finally: - try: - api.Backend.ldap2.disconnect() - except Exception: - pass if not subject_base: root_logger.debug('Unable to find certificate subject base in DS') |