[Freeipa-devel] [PATCHES] 0772-0774 Python3 fixes in for client installation

Petr Viktorin pviktori at redhat.com
Wed Mar 2 13:58:53 UTC 2016


On 03/01/2016 08:57 AM, Jan Cholasta wrote:
> On 29.2.2016 17:14, Petr Viktorin wrote:
>> On 02/29/2016 08:12 AM, Jan Cholasta wrote:
>>> Hi,
>>>
>>> On 26.2.2016 17:14, Petr Viktorin wrote:
>>>> On 02/22/2016 12:37 PM, Petr Viktorin wrote:
>>>>> Hello,
>>>>> These fixes are needed for the "happy path" of ipa-client-install
>>>>> --server on Python 3.
>>>>
>>>> Hello,
>>>> Could someone please look at these patches?
>>>
>>> Patch 0772:
> 
> It seems this bit:
> 
> +                [cn] = lres.raw['cn']
> +                lrealms.append(cn.decode('utf-8'))
> 
> breaks ipa-client-install:
> 
> Traceback (most recent call last):
>   File "/sbin/ipa-client-install", line 3099, in <module>
>     sys.exit(main())
>   File "/sbin/ipa-client-install", line 3080, in main
>     rval = install(options, env, fstore, statestore)
>   File "/sbin/ipa-client-install", line 2769, in install
>     delete_persistent_client_session_data(host_principal)
>   File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 145, in
> delete_persistent_client_session_data
>     kernel_keyring.del_key(keyname)
>   File "/usr/lib/python2.7/site-packages/ipapython/kernel_keyring.py",
> line 130, in del_key
>     assert isinstance(key, str)
> AssertionError
> 
> because realm is returned as unicode from ipadiscovery.

Ah, thhanks for the catch. This should fix it.

> 
>>>
>>> 1) Instead of decoding when the type is bytes in get_ipa_basedn(), read
>>> attribute values from 'entry.raw' rather than 'entry' and decode always.
>>
>> Done.
>>
>>> 2) get_ipa_basedn() is used only in ipadiscovery, perhaps we should move
>>> it there?
>>
>> I did that in an extra patch, mainly to make the diff more meaningful.
> 
> OK. The patch needs a rebase for ipa-4-3, there is a stray
> get_ipa_basedn import in install/migration/migration.py.

Attaching patch 0775 for that, please apply it before the others.

>>> Patch 0773: ACK, but the patch does not apply on ipa-4-3.

Could you try `git cherry-pick` from the master branch after applying to
master?

>>> Patch 0774: ACK.
> 
> 


-- 
Petr Viktorin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0771.3-Move-get_ipa_basedn-from-ipautil-to-ipadiscovery.patch
Type: text/x-patch
Size: 5126 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160302/34336f35/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0772.3-ipadiscovery-Decode-to-unicode-in-ipacheckldap-get_i.patch
Type: text/x-patch
Size: 2661 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160302/34336f35/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0773.3-ipapython.sysrestore-Use-str-methods-instead-of-func.patch
Type: text/x-patch
Size: 2705 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160302/34336f35/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0774.3-ipalib.x809-Accept-bytes-for-make_pem.patch
Type: text/x-patch
Size: 928 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160302/34336f35/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0775-ipa-4-3-migration.py-Remove-stray-get_ipa_basedn-import.patch
Type: text/x-patch
Size: 824 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160302/34336f35/attachment-0004.bin>


More information about the Freeipa-devel mailing list