New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libexec scripts: ldap conn management #216
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
except for minor comments, the code looks good to me. I tested the certificates renewal (CA, ipaCert and http/ldap) and it works as expected.
| @@ -507,6 +508,8 @@ def main(): | |||
| certs.renewal_lock.release() | |||
| shutil.rmtree(tmpdir) | |||
|
|
|||
| api.Backend.ldap2.disconnect() | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to move the disconnect() call in the finally block to make sure it gets executed
| @@ -200,6 +201,8 @@ def _main(): | |||
| syslog.syslog( | |||
| syslog.LOG_NOTICE, "Started %s" % dogtag_service.service_name) | |||
|
|
|||
| api.Backend.ldap2.disconnect() | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: disconnect() may not always be called
| @@ -75,6 +76,7 @@ def _main(): | |||
| else: | |||
| syslog.syslog(syslog.LOG_NOTICE, "Restarted httpd") | |||
|
|
|||
| api.Backend.ldap2.disconnect() | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: disconnect() may not always be executed
Certificate renewal scripts require connection to LDAP. Properly handle connects and disconnects from LDAP. https://fedorahosted.org/freeipa/ticket/6461
ab992c7
to
8f4e1c5
Compare
|
Thanks for the update. Works for me. |
|
Fixed upstream |
Certificate renewal scripts require connection to LDAP. Properly
handle connects and disconnects from LDAP.
https://fedorahosted.org/freeipa/ticket/6461