[Freeipa-devel] [PATCH] 884 migration context and logging

Rob Crittenden rcritten at redhat.com
Tue Oct 4 13:26:55 UTC 2011


Martin Kosek wrote:
> On Tue, 2011-10-04 at 08:53 -0400, Rob Crittenden wrote:
>> Martin Kosek wrote:
>>> On Mon, 2011-10-03 at 16:44 -0400, Rob Crittenden wrote:
>>>> Martin Kosek wrote:
>>>>> On Mon, 2011-09-26 at 22:24 -0400, Rob Crittenden wrote:
>>>>>> We can't assume that there will be only one naming context. Look at each
>>>>>> one until we find an IPA one.
>>>>>>
>>>>>> Add logging so you can know that a migration attempt fails and why.
>>>>>>
>>>>>> rob
>>>>>
>>>>> Looks good, its just difficult to set up a proper environment for
>>>>> reproduction. So far, I found just this problem:
>>>>>
>>>>> [Tue Sep 27 10:30:39 2011] [error] [client 10.34.25.52] mod_wsgi (pid=32705): Exception occurred processing WSGI script '/usr/share/ipa/migration/migration.py'.
>>>>> [Tue Sep 27 10:30:40 2011] [error] [client 10.34.25.52] Traceback (most recent call last):
>>>>> [Tue Sep 27 10:30:40 2011] [error] [client 10.34.25.52]   File "/usr/share/ipa/migration/migration.py", line 127, in application
>>>>> [Tue Sep 27 10:30:40 2011] [error] [client 10.34.25.52]     bind(form_data['username'].value, form_data['password'].value)
>>>>> [Tue Sep 27 10:30:40 2011] [error] [client 10.34.25.52]   File "/usr/share/ipa/migration/migration.py", line 107, in bind
>>>>> [Tue Sep 27 10:30:40 2011] [error] [client 10.34.25.52]     logging.error('migration bind failed: %s' % convert_exception(e))
>>>>>
>>>>> Martin
>>>>>
>>>>
>>>> Just missed saving the exception as a variable, should work now.
>>>>
>>>> rob
>>>
>>> Works fine, tested on multiple-suffix LDAP server. We should be also
>>> fine when anonymous access is not allowed (Simo was dealing with this in
>>> ipa-client-install in #1881) since migration.py binds via socket.
>>>
>>> I have just one suggestion - instead of searching for correct naming
>>> context on your own, you may want to use a function get_ipa_basedn() I
>>> implemented for ipa-client-install (#1868). This will do all the checks
>>> and return you just the IPA baseDN:
>>>
>>> https://fedorahosted.org/freeipa/changeset/00cffce6c2ba0121188326535d6c9cd244a4ae5b
>>>
>>> Martin
>>>
>>
>> Well, I did mine first so you should have copied from me :-)
>
> I _did_ copy from you ;-) I just made a function for it so that it can
> be reused.
>
>>
>> I'll see if I can safely import that.
>>
>> rob
>
> Ok.
>
> Martin
>

Done

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-rcrit-884-3-migration.patch
Type: text/x-patch
Size: 4072 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20111004/a93ac220/attachment.bin>


More information about the Freeipa-devel mailing list