RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1843550 - The numSubordinates value doesn't always match the number of direct subordinate(s).
Summary: The numSubordinates value doesn't always match the number of direct subordina...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Simon Pichugin
QA Contact: RHDS QE
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-03 14:08 UTC by Simon Pichugin
Modified: 2021-05-18 15:45 UTC (History)
8 users (show)

Fixed In Version: 389-ds-devel-1.4-8040020201105165416.866effaa
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:45:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 4153 0 None closed The numSubordinates value doesn't always match the number of direct subordinate(s). 2021-02-02 12:16:11 UTC

Description Simon Pichugin 2020-06-03 14:08:38 UTC
Issue Description
The numSubordinates value should give the number of immediate subordinates.
But it could be inaccurate in cn=monitor case.

Package Version and Platform
$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)
$
$ rpm -qa | grep 389-ds-base
389-ds-base-libs-1.4.2.12-2.module+el8dsrv+6428+6e54c518.x86_64
389-ds-base-1.4.2.12-2.module+el8dsrv+6428+6e54c518.x86_64
$

Steps to reproduce
Install 389-ds 1.4.2 on RHEL 8.2 ( I can reproduce also on RHEL 7 - 389-ds 1.3.10 ).
Create a new suffix with some sample entries.
Compare the numSubordinates value on the root entry with the actual number of direct subordinate(s).
Actual results
The numSubordinates value for the root entry is always higher ( +1 ) than the number of immediate children.

There seems to be a miscalculation for the "cn=monitor" entry:
$ ldapsearch -LLL -Y EXTERNAL -H 'ldapi://%2fvar%2frun%2fslapd-<instance>.socket' -b "cn=monitor" -s base "objectclass=*" 1.1 numSubordinates 2> /dev/null
dn: cn=monitor
numSubordinates: 4

$ ldapsearch -LLL -Y EXTERNAL -H 'ldapi://%2fvar%2frun%2fslapd-<instance>.socket' -b "cn=monitor" -sone "(|(objectclass=*)(objectclass=ldapsubentry))" 1.1 2>/dev/null | grep -c ^dn:
3

Expected results
Both values should be identical.

Cloned from: https://pagure.io/389-ds-base/issue/51100

Comment 5 sgouvern 2020-11-30 08:53:35 UTC
Need more time to test it
-> moving to ITM 6

Comment 7 sgouvern 2020-12-18 10:47:15 UTC
ITM strip suspended during end of year break -> moving to ITM 10

Comment 8 Simon Pichugin 2021-01-13 17:48:41 UTC
You can try to verify it once again as the issue that was blocking this issue was fixed (presumably).

The build that should be tested - 389-ds-1.4-8040020210113163752-866effaa

Comment 9 Akshay Adhikari 2021-01-15 15:57:42 UTC
Build Tested: 389-ds-base-1.4.3.16-8.module+el8.4.0+9441+bd0f8b1f.x86_64

ldapsearch -LLL -Y EXTERNAL -H 'ldapi://%2fvar%2frun%2fslapd-<instance>.socket' -b "cn=monitor" -s base "objectclass=*" 1.1 numSubordinates 2> /dev/null
dn: cn=monitor
numSubordinates: 3

ldapsearch -LLL -Y EXTERNAL -H 'ldapi://%2fvar%2frun%2fslapd-<instance>.socket' -b "cn=monitor" -sone "(|(objectclass=*)(objectclass=ldapsubentry))" 1.1 2>/dev/null | grep -c ^dn:
3

-> Marking as verified: tested.

Comment 12 sgouvern 2021-01-18 15:18:15 UTC
As per comment 9, marking as VERIFIED

Comment 14 errata-xmlrpc 2021-05-18 15:45:16 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 (389-ds:1.4 bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2021:1835


Note You need to log in before you can comment on or make changes to this bug.