On 06/19/2015 09:44 AM, Fraser Tweedale wrote:
> On Fri, Jun 19, 2015 at 09:38:01AM +0200, Martin Kosek wrote:
>> On 06/19/2015 09:28 AM, Fraser Tweedale wrote:
>>> The attached patches fix upgrade issues when pki is also updated
>>> from pre 10.2.4.
>>> pki dependency is bumped to 10.2.5 - the official builds should be
>>> done Friday (US time) but it is available from my copr. If
>>> someone wants to add to official freeipa COPR in meantime the SRPM
>>> is here.
>>>  https://copr.fedoraproject.org/coprs/ftweedal/freeipa/
>>>  https://ftweedal.fedorapeople.org/pki-core-10.2.5-0.2.fc21.src.rpm
>> This may work, it would be of course cleaner to do this via context manager,
>> lines with:
>> def ldap_connect_autobind():
>> if not api.Backend.ldap2.isconnected():
>> if api.Backend.ldap2.isconnected():
>> with ldap_connect_autobind():
>> # do API stuff
>> except PublicError, e:
>> as that would also unbind it if exception is raised for example.
> Unless you or others feel strongly about this, let us do it as a
> cleanup later, as there are several places in upgrade.py that do
> this sort of thing.
> Alternatively (or in addition) we need to make ldap2 be able to
> attempt to reconnect on failure, as Simo (I think it was Simo)
> suggested recently in another thread.
Sure. Whatever is more systematic approach to this solution. We need to have as
less hacks in the code as possible.
Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code