Bug 1956560

Summary: FreeIPA server upgrade to Rawhide fails with "no such entry" error
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: freeipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: abokovoy, fdc, ftrivino, ipa-maint, jcholast, jhrozek, mhjacks, pvoborni, rcritten, robatino, ssorce, tbordaz, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: openqa
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-10 18:52:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1947762    
Bug Blocks: 1891953    
Description Flags
/var/log from today's F34 to Rawhide upgrade failure none

Description Adam Williamson 2021-05-03 22:25:04 UTC
Since around Fedora-Rawhide-20210408.n.0 (it failed on 0408, passed on 0409, then failed every compose since 0410, not sure what's going on there), the openQA tests that deploy a FreeIPA server on Fedora 33 or 34 and then upgrade to Rawhide are failing. After the upgrade process is complete, ipa.service shows as failed. ipaupgrade.log shows this at the end:

2021-05-02T11:40:48Z DEBUG stderr=
2021-05-02T11:40:48Z DEBUG Destroyed connection context.ldap2_139750995304256
2021-05-02T11:40:48Z ERROR Upgrade failed with no such entry
2021-05-02T11:40:48Z DEBUG Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/ipapython/ipaldap.py", line 1085, in error_handler
  File "/usr/lib/python3.9/site-packages/ipapython/ipaldap.py", line 1657, in add_entry
    self.conn.add_s(str(entry.dn), list(attrs.items()))
  File "/usr/lib64/python3.9/site-packages/ldap/ldapobject.py", line 439, in add_s
    return self.add_ext_s(dn,modlist,None,None)
  File "/usr/lib64/python3.9/site-packages/ldap/ldapobject.py", line 425, in add_ext_s
    resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
  File "/usr/lib64/python3.9/site-packages/ldap/ldapobject.py", line 764, in result3
    resp_type, resp_data, resp_msgid, decoded_resp_ctrls, retoid, retval = self.result4(
  File "/usr/lib64/python3.9/site-packages/ldap/ldapobject.py", line 774, in result4
    ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
  File "/usr/lib64/python3.9/site-packages/ldap/ldapobject.py", line 340, in _ldap_call
    reraise(exc_type, exc_value, exc_traceback)
  File "/usr/lib64/python3.9/site-packages/ldap/compat.py", line 46, in reraise
    raise exc_value
  File "/usr/lib64/python3.9/site-packages/ldap/ldapobject.py", line 324, in _ldap_call
    result = func(*args,**kwargs)
ldap.NO_SUCH_OBJECT: {'msgtype': 105, 'msgid': 616, 'result': 32, 'desc': 'No such object', 'ctrls': [], 'matched': 'dc=test,dc=openqa,dc=fedoraproject,dc=org'}

then a ton of nested tracebacks. A bit earlier there is this:

2021-05-02T11:43:12Z ERROR update_idrange_type: cannot retrieve list of ranges with no type set: no such entry

I will attach the full /var/log tarball for perusal.

Comment 1 Adam Williamson 2021-05-03 22:27:02 UTC
Created attachment 1779145 [details]
/var/log from today's F34 to Rawhide upgrade failure

Comment 2 Alexander Bokovoy 2021-05-04 04:31:12 UTC
I think this the same problem we saw earlier with 389-ds in F34 upgrade that I backed out: https://bodhi.fedoraproject.org/updates/FEDORA-2021-123ca32c27

The corresponding 389-ds-base bugzilla is https://bugzilla.redhat.com/show_bug.cgi?id=1947762

Comment 3 Adam Williamson 2021-05-04 06:09:21 UTC
oh, yeah, I *thought* I remembered this but couldn't find that bug report when I went looking :/ I'll double check tomorrow if they're really dupes. I kinda remembered there were more errors in that case, but I may have got it wrong.

Comment 4 thierry bordaz 2021-05-04 08:47:15 UTC
@flo provided a reproducer testcase, I started looking at it, reproduced but was stuck how to start investigating. It is looking like mapping tree got broken, possibly related to LMDB work.

Comment 5 Adam Williamson 2021-05-10 18:52:11 UTC
yeah, let's just call this a dupe.

*** This bug has been marked as a duplicate of bug 1947762 ***