#5283 AttributeError in ipaupgrade logs
Closed: Fixed None Opened 8 years ago by ofayans.

Hi. I was upgrading my ipa to the latest upstream code today and the installation stdout presented me with the following error message:

freeipa-python-4.2.90.201508040613GIT5########################################
IPA server upgrade failed: Inspect /var/log/ipaupgrade.log and run command ipa-server-upgrade manually.
Unexpected error - see /var/log/ipaupgrade.log for details:
AttributeError: 'int' object has no attribute 'lower'

The corresponding part of the ipaupgrade.log is as follows:

2015-09-03T06:47:40Z DEBUG flushing ldapi://%2fvar%2frun%2fslapd-PESEN-NET.socket from SchemaCache
2015-09-03T06:47:40Z DEBUG retrieving schema for SchemaCache url=ldapi://%2fvar%2frun%2fslapd-PESEN-NET.socket conn=<ldap.ldapobject.SimpleLDAPObject instance at 0x7f2e90940290>
2015-09-03T06:47:40Z DEBUG Processing schema LDIF file /usr/share/ipa/60kerberos.ldif
2015-09-03T06:47:41Z DEBUG Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 416, in start_creation
    run_step(full_msg, method)
  File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 406, in run_step
    method()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py", line 299, in __update_schema
    dm_password='', ldapi=True) or self.modified
  File "/usr/lib/python2.7/site-packages/ipaserver/install/schemaupdate.py", line 131, in update_schema
    for oids_set in _get_oid_dependency_order(new_schema, cls):
  File "/usr/lib/python2.7/site-packages/ipaserver/install/schemaupdate.py", line 59, in _get_oid_dependency_order
    unordered_oids = set(tree)
  File "/usr/lib64/python2.7/site-packages/ldap/cidict.py", line 27, in __getitem__
    return self.data[lower(key)]
  File "/usr/lib64/python2.7/string.py", line 228, in lower
    return s.lower()
AttributeError: 'int' object has no attribute 'lower'

2015-09-03T06:47:41Z DEBUG   [error] AttributeError: 'int' object has no attribute 'lower'
2015-09-03T06:47:41Z DEBUG   [cleanup]: stopping directory server
2015-09-03T06:47:41Z DEBUG Starting external process
2015-09-03T06:47:41Z DEBUG args='/bin/systemctl' 'stop' 'dirsrv@PESEN-NET.service'

That also means the IPA server won't start anymore.

This bug is caused by recent py3 migration.

python-ldap cidict type doesnt work with set() or list()

In [11]: d = cidict({'0.0.0.0.1':[]})

In [12]: set(d)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-12-e8076e9b1063> in <module>()
----> 1 set(d)

/usr/lib64/python2.7/site-packages/ldap/cidict.pyc in __getitem__(self, key)
     25 
     26   def __getitem__(self,key):
---> 27     return self.data[lower(key)]
     28 
     29   def __setitem__(self,key,value):

/usr/lib64/python2.7/string.pyc in lower(s)
    226 
    227     """
--> 228     return s.lower()
    229 
    230 # Convert lower case letters to UPPER CASE

AttributeError: 'int' object has no attribute 'lower'

master:

  • 0c5e41c Server Upgrade: fix traceback caused by cidict

Metadata Update from @ofayans:
- Issue assigned to mbasti
- Issue set to the milestone: FreeIPA 4.3

7 years ago

Login to comment on this ticket.

Metadata