Bug 1160758

Summary: Tests: host-del returns DatabaseError
Product: Red Hat Enterprise Linux 7 Reporter: Martin Kosek <mkosek>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.1CC: jcholast, lkrispen, mkosek, rcritten, spoore, sreber, tbordaz
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-4.1.0-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:14:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1150206    
Bug Blocks:    

Description Martin Kosek 2014-11-05 14:57:41 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/4586

With `389-ds-base-1.3.3.2-2.fc20.x86_64` I get:

{{{
# ./make-test ipatests/test_xmlrpc/test_cert_plugin.py
...
======================================================================
ERROR: Clean up cert test data
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/root/freeipa-master/ipatests/test_xmlrpc/test_cert_plugin.py", line 198, in test_0007_cleanup
    api.Command['host_del'](self.host_fqdn)
  File "/root/freeipa-master/ipalib/frontend.py", line 439, in __call__
    ret = self.run(*args, **options)
  File "/root/freeipa-master/ipalib/frontend.py", line 755, in run
    return self.forward(*args, **options)
  File "/root/freeipa-master/ipalib/frontend.py", line 776, in forward
    return self.Backend.rpcclient.forward(self.name, *args, **kw)
  File "/root/freeipa-master/ipalib/rpc.py", line 880, in forward
    return self._call_command(command, params)
  File "/root/freeipa-master/ipalib/rpc.py", line 857, in _call_command
    return command(*params)
  File "/root/freeipa-master/ipalib/rpc.py", line 1004, in _call
    return self.__request(name, args)
  File "/root/freeipa-master/ipalib/rpc.py", line 998, in __request
    raise error_class(message=error['message'])
DatabaseError: Operations error: 
}}}

errors log:
{{{
[28/Sep/2014:18:43:18 -0400] - database error -30993
[28/Sep/2014:18:43:18 -0400] - database error -30993
[28/Sep/2014:18:43:19 -0400] - database error -30993
[28/Sep/2014:18:43:19 -0400] - database error -30993
[28/Sep/2014:18:43:19 -0400] - database error -30993
[28/Sep/2014:18:43:20 -0400] - database error -30993
[28/Sep/2014:18:43:20 -0400] - database error -30993
[28/Sep/2014:18:43:20 -0400] - database error -30993
[28/Sep/2014:18:43:20 -0400] - database error -30993
[28/Sep/2014:18:43:20 -0400] - database error -30993
[28/Sep/2014:18:43:21 -0400] - database error -30993
[28/Sep/2014:18:43:21 -0400] - database error -30993
[28/Sep/2014:18:43:21 -0400] - database error -30993
[28/Sep/2014:18:43:22 -0400] - database error -30993
[28/Sep/2014:18:43:22 -0400] - database error -30993
[28/Sep/2014:18:43:22 -0400] - Operation error fetching Null DN (c970c1b8-476011e4-9f61c45a-c8138913),  error -30993.
[28/Sep/2014:18:43:22 -0400] - dn2entry_ext: Failed to get id for changenumber=7523,cn=changelog from   entryrdn index (-30993)
[28/Sep/2014:18:43:22 -0400] - Operation error fetching changenumber=7523,cn=changelog (null), error -  30993.
[28/Sep/2014:18:43:22 -0400] DSRetroclPlugin - replog: an error occured while adding change number      7523, dn = changenumber=7523,cn=changelog: Operations error. 
[28/Sep/2014:18:43:22 -0400] retrocl-plugin - retrocl_postob: operation failure [1]
}}}

access log:
{{{
[28/Sep/2014:18:43:18 -0400] conn=2153 op=14 DEL dn="krbprincipalname=test/ipatestcert.mkosek-fedora20. test,cn=services,cn=accounts,dc=mkosek-fedora20,dc=test"
[28/Sep/2014:18:43:18 -0400] conn=3 op=177 SRCH base="cn=15,ou=certificateRepository,ou=ca,o=ipaca"     scope=0 filter="(objectClass=*)" attrs=ALL
[28/Sep/2014:18:43:18 -0400] conn=3 op=177 RESULT err=0 tag=101 nentries=1 etime=0
[28/Sep/2014:18:43:18 -0400] conn=3 op=178 SRCH base="cn=19,ou=ca,ou=requests,o=ipaca" scope=0          filter="(objectClass=*)" attrs=ALL
[28/Sep/2014:18:43:18 -0400] conn=3 op=178 RESULT err=0 tag=101 nentries=1 etime=0
[28/Sep/2014:18:43:18 -0400] conn=3 op=179 MOD dn="ou=ca,ou=requests,o=ipaca"
[28/Sep/2014:18:43:18 -0400] conn=2153 op=15 SRCH base="fqdn=ipatestcert.mkosek-fedora20.test,          cn=computers,cn=accounts,dc=mkosek-fedora20,dc=test" scope=0 filter="(objectClass=*)"                   attrs="userCertificate"
[28/Sep/2014:18:43:18 -0400] conn=2153 op=15 RESULT err=0 tag=101 nentries=1 etime=0
[28/Sep/2014:18:43:18 -0400] conn=2153 op=16 DEL dn="fqdn=ipatestcert.mkosek-fedora20.test,cn=computers,cn=accounts,dc=mkosek-fedora20,dc=test"
[28/Sep/2014:18:43:18 -0400] conn=2153 op=14 RESULT err=0 tag=107 nentries=0 etime=0
[28/Sep/2014:18:43:22 -0400] conn=3 op=179 RESULT err=0 tag=103 nentries=0 etime=4
[28/Sep/2014:18:43:22 -0400] conn=2153 op=16 RESULT err=1 tag=107 nentries=0 etime=4
[28/Sep/2014:18:43:23 -0400] conn=2154 fd=136 slot=136 connection from 10.16.78.147 to 10.16.78.147
[28/Sep/2014:18:43:23 -0400] conn=2153 op=17 UNBIND
}}}

Comment 1 Martin Kosek 2014-11-05 14:59:29 UTC
master:

08c3fe17ef5ef103068fe09a4e855ada11381b03 Ignore irrelevant subtrees in schema compat plugin
ipa-4-1:

57eab1e18e5371c9edc41b1f1e98ead56f741eae Ignore irrelevant subtrees in schema compat plugin
ipa-4-0:

86b5dce4d837c7c03d370287fc30416d16b1dd82 Ignore irrelevant subtrees in schema compat plugin
Together with DS fix for ​https://fedorahosted.org/389/ticket/47918 the issue no longer occurs.

Comment 2 Namita Soman 2014-11-06 18:36:45 UTC
Please add steps to verify this

Comment 4 Martin Kosek 2014-11-18 12:12:09 UTC
There is no know reliable reproduction scenario except running FreeIPA test suite AFAIK, CCing Ludwig and Thierry to advise.

If not, this can be treated as SanityOnly testing as the issue was rather intermittent.

Comment 5 Ludwig 2014-11-18 12:26:02 UTC
Martin is right, there is no specific test to enforce the error ( or prove it no longer exists). The problems did show up in ipa tests or upgrades, so it should be enough to run the usual tests

Comment 6 Scott Poore 2015-01-24 18:04:54 UTC
Verified.

Marking verified sanity only since it looks like Shanks' run of the ipa host-* tests went smoothly. and We've seen no other results indicating this error in our normal testing.

Version ::

ipa-server-4.1.0-15

Results ::

 +-----------------------------[RPMs & OS: [RedHat - x86_64]-----------------------------+
|       ipa-admintools-4.1.0-15.el7.x86_64
|       ipa-client-4.1.0-15.el7.x86_64
|       ipa-server-4.1.0-15.el7.x86_64
|       ipa-tests-ipa-server-rhel71-ipa-host-cli-20150122195949-0.noarch
|       ipa-tests-ipa-server-rhel71-quickinstall-20150113103102-0.noarch
|       ipa-tests-ipa-server-rhel71-shared-20150121142009-0.noarch
|       sssd-ipa-1.12.2-42.el7.x86_64
------------------------------------------------------------------------------------------

 +-----------------------------------------------------------------------------------------+
     Test:[/ipa-server/rhel71/ipa-host-cli/root]: [ Pass(118/118): 100% ] 
 +-----------------------------------------------------------------------------------------+
:: [   PASS   ]   Setup
:: [   PASS   ]   Setup
:: [   PASS   ]   ipa-host-cli-001: Add lower case host
:: [   PASS   ]   ipa-host-cli-002: Add upper case host
:: [   PASS   ]   ipa-host-cli-003: Add host with dashes in hostname
:: [   PASS   ]   ipa-host-cli-004: Modify host location
:: [   PASS   ]   ipa-host-cli-005: Modify host platform
:: [   PASS   ]   ipa-host-cli-006: Modify host os
:: [   PASS   ]   ipa-host-cli-007: Modify host description
:: [   PASS   ]   ipa-host-cli-008: Modify host locality
:: [   PASS   ]   ipa-host-cli-009: Show Host Objectclasses
:: [   PASS   ]   ipa-host-cli-010: Disable Host - Remove Keytab
:: [   PASS   ]   ipa-host-cli-011: ipa host-mod modifying platform modifies os bz499016
:: [   PASS   ]   ipa-host-cli-012: Negative - add duplicate host
:: [   PASS   ]   ipa-host-cli-013: Negative - Delete host that doesn't exist
:: [   PASS   ]   ipa-host-cli-014: Negative - setattr and addattr on fqdn
:: [   PASS   ]   ipa-host-cli-015: Negative - setattr and addattr on ipaUniqueID
:: [   PASS   ]   ipa-host-cli-016: Negative - setattr and addattr on krbPrincipalName
:: [   PASS   ]   ipa-host-cli-018: setattr and addattr on nsHostLocation
:: [   PASS   ]   ipa-host-cli-019: setattr and addattr on l - locality
:: [   PASS   ]   ipa-host-cli-020: setattr and addattr on nsOsVersion
:: [   PASS   ]   ipa-host-cli-022: Negative - setattr and addattr on enrolledBy - invalid syntax
:: [   PASS   ]   ipa-host-cli-023: setattr and addattr on description
:: [   PASS   ]   ipa-host-cli-024: Delete Hosts
:: [   PASS   ]   ipa-host-cli-025: Negative - add host not fully qualified DN
:: [   PASS   ]   ipa-host-cli-026: Modify Host that doesn't Exist
:: [   PASS   ]   ipa-host-cli-027: Find Host that doesn't Exist
:: [   PASS   ]   ipa-host-cli-028: Show Host that doesn't Exist
:: [   PASS   ]   ipa-host-cli-029: Disable Host that doesn't Exist
:: [   PASS   ]   ipa-host-cli-030: Add Host without force or add DNS record options
:: [   PASS   ]   ipa-host-cli-031: Negative - setattr and addattr on dn
:: [   PASS   ]   ipa-host-cli-032: Negative - setattr and addattr on cn
:: [   PASS   ]   ipa-host-cli-033: Negative - setattr and addattr on keytab
:: [   PASS   ]   ipa-host-cli-034: Add 10 hosts and test find returns search limit
:: [   PASS   ]   ipa-host-cli-035: find 0 hosts
:: [   PASS   ]   ipa-host-cli-036: find 7 hosts
:: [   PASS   ]   ipa-host-cli-037: find 9 hosts
:: [   PASS   ]   ipa-host-cli-038: find more hosts than exist
:: [   PASS   ]   ipa-host-cli-039: find hosts - size limit not an integer
:: [   PASS   ]   ipa-host-cli-040: find hosts - time limit 0
:: [   PASS   ]   ipa-host-cli-041: find hosts - time limit not an integer
:: [   PASS   ]   ipa-host-cli-042: add Managed By Host
:: [   PASS   ]   ipa-host-cli-043: removed Managed By Host
:: [   PASS   ]   ipa-host-cli-044: add Multiple Managed By Host
:: [   PASS   ]   ipa-host-cli-045: removed Multiple Managed By Hosts
:: [   PASS   ]   ipa-host-cli-046: Add host with DNS Record
:: [   PASS   ]   ipa-host-cli-047: Delete host without deleting DNS Record
:: [   PASS   ]   ipa-host-cli-048: Add host without force option - DNS Record Exists
:: [   PASS   ]   ipa-host-cli-049: Delete Host and Update DNS
:: [   PASS   ]   ipa-host-cli-050: Delete Host and Update DNS when DNS entries do not exist
:: [   PASS   ]   ipa-host-cli-051: Add host with DNS Record --no-reverse
:: [   PASS   ]   ipa-host-cli-052: host name ending in . 
:: [   PASS   ]   ipa-host-cli-053: Negative - add host with _
:: [   PASS   ]   ipa-host-cli-054: Negative - add host with ~
:: [   PASS   ]   ipa-host-cli-055: Negative - add host with +
:: [   PASS   ]   ipa-host-cli-056: search with man-hosts when Managed By a Host
:: [   PASS   ]   ipa-host-cli-057: search a host when Managed By Host is removed
:: [   PASS   ]   ipa-host-cli-058: search a host when Managed by multiple Hosts
:: [   PASS   ]   ipa-host-cli-059: search a host when Multiple Managed By Hosts removed
:: [   PASS   ]   ipa-host-cli-060: search a host when Manages multiple Hosts
:: [   PASS   ]   ipa-host-cli-061: Negative - search with man-hosts when host does not exist
:: [   PASS   ]   ipa-host-cli-062: search with not-man-hosts when Managed By a Host
:: [   PASS   ]   ipa-host-cli-063: search a host when Managed By Host is removed
:: [   PASS   ]   ipa-host-cli-064: search with not-man-hosts when host is Managed by multiple Hosts
:: [   PASS   ]   ipa-host-cli-065: search with not-man-by-host when Multiple Managed By Hosts removed
:: [   PASS   ]   ipa-host-cli-066: search with not-man-hosts when Manages multiple Hosts
:: [   PASS   ]   ipa-host-cli-067: Negative - search with not-man-hosts when host does not exist
:: [   PASS   ]   ipa-host-cli-068: --pkey-only test of ipa host-find
:: [   PASS   ]   ipa-host-cli-069: Negative - host name ending in . - a host without trailing . already exist
:: [   PASS   ]   ipa-host-cli-070: delete a host name ending in . 
:: [   PASS   ]   ipa-host-cli-071: host-show when the name ending in . 
:: [   PASS   ]   ipa-host-cli-072: host-add-managedby when the name ending in . 
:: [   PASS   ]   ipa-host-cli-073: host-remove-managedby when the name ending in . 
:: [   PASS   ]   ipa-host-cli-074: host-mod when the name ending in . 
:: [   PASS   ]   ipa-host-cli-075: host-find when the name ending in . 
:: [   PASS   ]   ipa-host-cli-076: host-disable when the name ending in . 
:: [   PASS   ]   ipa-host-cli-077: Positive host-find test using --in-hbacrules
:: [   PASS   ]   ipa-host-cli-078: Negative host-find test using --in-hbacrules
:: [   PASS   ]   ipa-host-cli-079: Positive host-find test using --not-in-hbacrules
:: [   PASS   ]   ipa-host-cli-080: Negative host-find test using --not-in-hbacrules
:: [   PASS   ]   ipa-host-cli-081: Positive test of search of hosts in a sudorules
:: [   PASS   ]   ipa-host-cli-082: Negative test of search of hosts in a sudorule
:: [   PASS   ]   ipa-host-cli-083: Positive test of search of hosts not in a sudorule
:: [   PASS   ]   ipa-host-cli-084: Negative test of search of hosts not in a sudorule
:: [   PASS   ]   ipa-host-cli-085: Positive test of search of host after it has been removed from the sudorule
:: [   PASS   ]   ipa-host-cli-086: Negative test of search of host after it has been removed from the sudorule
:: [   PASS   ]   Cleanup
:: [   PASS   ]   ipa-host-cli-macaddress-startup Install nss-pam-ldapd package, set ethers to ldap and create temp directory.
:: [   PASS   ]   ipa-host-cli-094: add a host with --macaddress --force
:: [   PASS   ]   ipa-host-cli-095: Delete Host
:: [   PASS   ]   ipa-host-cli-096: Add host with --macaddress and DNS Record
:: [   PASS   ]   ipa-host-cli-097: Delete host that has --macaddress without deleting DNS Record
:: [   PASS   ]   ipa-host-cli-098: Add host with --macaddress without force option - DNS Record Exists
:: [   PASS   ]   ipa-host-cli-099: Delete Host that has -macaddress and Update DNS
:: [   PASS   ]   ipa-host-cli-100: host-mod of a host with --macaddress 
:: [   PASS   ]   ipa-host-cli-101: setattr --macaddress
:: [   PASS   ]   ipa-host-cli-102: setattr --macaddress and addattr on macaddress
:: [   PASS   ]   ipa-host-cli-103: Modify Host with --macaddress - host doesn't Exist
:: [   PASS   ]   ipa-host-cli-104: addattr --macaddress
:: [   PASS   ]   ipa-host-cli-105: delattr --macaddress
:: [   PASS   ]   ipa-host-cli-106: delattr --macaddress with incorrect value
:: [   PASS   ]   ipa-host-cli-107: Negative - add a host with invalid macaddress
:: [   PASS   ]   ipa-host-cli-108: delattr --macaddress with lowercase
:: [   PASS   ]   ipa-host-cli-macaddress-cleanup Remove nss-pam-ldapd, nsswitch.conf back on default and remove temp directory.
:: [   PASS   ]   ipa-host-bugzilla-001: BZ807388 - Error message has not a user friendly 'u' character in it.
:: [   PASS   ]   ipa-host-bugzilla-002: BZ827392 - Random password characters should be limited.
:: [   PASS   ]   ipa-host-bugzilla-003: BZ918261 - Some managed netgroups are not suppressed in host and hostgroup commands output
:: [   PASS   ]   BZ955695 TC1 Check userClass attribute exists in objectClass ipaHost in schema bz955695
:: [   PASS   ]   BZ955695 TC2 Add host in single hostgroup using regex set for hostgroup bz955695
:: [   PASS   ]   BZ955695 TC3 Add host in multiple hostgroups using regex set for hostgroups bz955695
:: [   PASS   ]   BZ955695 TC4 Add host using non-existing regex
:: [   PASS   ]   BZ955695 TC5 Find hosts using single value for class parameter
:: [   PASS   ]   BZ955695 TC6 Find hosts using multiple values for class parameter
:: [   PASS   ]   BZ955695 TC7 ipa host-find with non-existent value for class parameter
:: [   PASS   ]   BZ955695 TC8 change hostgroup of host using class parameter to another hostgroup
:: [   PASS   ]   BZ955695 TC9 Add host in multiple hostgroups using class parameter from a single hostgroup
:: [   PASS   ]   BZ955695 TC10 help text displays this new parameter
:: [   PASS   ]   /ipa-server/rhel71/ipa-host-cli/root

Comment 8 errata-xmlrpc 2015-03-05 10:14:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0442.html