Re: [Freeipa-devel] [PATCH 0264] Server Upgrade: disconnect ldap2 connection before DS restart
On 16/06/15 16:04, Simo Sorce wrote: On Wed, 2015-06-10 at 13:47 +0200, Martin Basti wrote: Without this patch, upgrade may failed when api.Backend.ldap2 was connected before DS restart. Patch attached. although this patch is fine as is, I wonder why it is needed. I would argue that ldap2 should be able to reconnect on its own if the connection is broken, where am I wrong ? Simo. Honza also proposed this, it would be better, but not in 4.2.0. Martin^2 -- Martin Basti -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH 0264] Server Upgrade: disconnect ldap2 connection before DS restart
On Wed, 2015-06-10 at 13:47 +0200, Martin Basti wrote: > Without this patch, upgrade may failed when api.Backend.ldap2 was > connected before DS restart. > > Patch attached. > although this patch is fine as is, I wonder why it is needed. I would argue that ldap2 should be able to reconnect on its own if the connection is broken, where am I wrong ? Simo. -- Simo Sorce * Red Hat, Inc * New York -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH 0264] Server Upgrade: disconnect ldap2 connection before DS restart
On 06/12/2015 03:26 PM, Martin Babinsky wrote: On 06/10/2015 01:47 PM, Martin Basti wrote: Without this patch, upgrade may failed when api.Backend.ldap2 was connected before DS restart. Patch attached. ACK Pushed to master: c1d484afde34cb68cfb0d187004e107342180399 -- Petr Vobornik -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [PATCH 0264] Server Upgrade: disconnect ldap2 connection before DS restart
On 06/10/2015 01:47 PM, Martin Basti wrote: Without this patch, upgrade may failed when api.Backend.ldap2 was connected before DS restart. Patch attached. ACK -- Martin^3 Babinsky -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [PATCH 0264] Server Upgrade: disconnect ldap2 connection before DS restart
Without this patch, upgrade may failed when api.Backend.ldap2 was connected before DS restart. Patch attached. -- Martin Basti From cae5117b505f24fc176196fc953170e3bad0507b Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Wed, 10 Jun 2015 13:24:48 +0200 Subject: [PATCH] Server Upgrade: disconnect ldap2 connection before DS restart Without this patch, the invalid api.Backend.ldap2 connection was used to communicate with DS and it raises network error after DS restart. --- ipaserver/install/server/upgrade.py | 5 + 1 file changed, 5 insertions(+) diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py index 306d1d27cda7a517117110ad3e6a760108f0fe19..a9dac59e009f5646630b7a8dd0e92f39b5a44a86 100644 --- a/ipaserver/install/server/upgrade.py +++ b/ipaserver/install/server/upgrade.py @@ -1369,6 +1369,11 @@ def upgrade_configuration(): ds = dsinstance.DsInstance() ds.configure_dirsrv_ccache() +# ldap2 connection is not valid after DS restart, close connection otherwise +# it will cause network errors +if api.Backend.ldap2.isconnected(): +api.Backend.ldap2.disconnect() + ds.stop(ds_serverid) fix_schema_file_syntax() remove_ds_ra_cert(subject_base) -- 2.1.0 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code