New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The numSubordinates value doesn't always match the number of direct subordinate(s). #4153
Comments
|
Comment from tmihinto at 2020-05-19 12:37:16 I can only reproduce with root entries including the special suffix "cn=monitor". |
|
Comment from firstyear (@Firstyear) at 2020-05-20 02:41:28 There are entries that are marked ldapsubentry in the root that you aren't seeing in a search, which is why this number isn't showing you the right amount. |
|
Comment from firstyear (@Firstyear) at 2020-05-20 02:41:29 Metadata Update from @Firstyear:
|
|
Comment from tmihinto at 2020-05-20 10:30:31 Thanks William! That explains it for the root entries: $ ldapsearch -LLL -Y EXTERNAL -H 'ldapi://%2fvar%2frun%2fslapd-.socket' -b "dc=example,dc=com" -sone "(|(objectclass=*)(objectclass=ldapsubentry))" 1.1 2>/dev/null | grep -c ^dn: There seems to be a miscalculation for the "cn=monitor" entry though: $ ldapsearch -LLL -Y EXTERNAL -H 'ldapi://%2fvar%2frun%2fslapd-.socket' -b "cn=monitor" -sone "(|(objectclass=*)(objectclass=ldapsubentry))" 1.1 2>/dev/null | grep -c ^dn: |
|
Comment from firstyear (@Firstyear) at 2020-05-21 00:59:38 cn=monitor is generated in memory and a bit magic, so that's probably not going to be accurate sadly. It's not really worth fixing unless something there is breaking? |
|
Comment from mreynolds (@mreynolds389) at 2020-05-21 17:46:22 Metadata Update from @mreynolds389:
|
|
Comment from spichugi (@droideck) at 2020-05-21 17:46:31 Metadata Update from @droideck:
|
|
Comment from mreynolds (@mreynolds389) at 2020-06-03 14:39:36 Metadata Update from @mreynolds389:
|
|
Comment from spichugi (@droideck) at 2020-06-09 16:56:56 |
|
Comment from spichugi (@droideck) at 2020-06-09 18:44:15 Metadata Update from @droideck:
|
|
Comment from spichugi (@droideck) at 2020-06-09 18:44:55 Metadata Update from @droideck:
|
Bug Description: The numSubordinates value doesn't always match the number of direct subordinate(s) Relates: 389ds#4153 Reviewed by: ??
Bug Description: The numSubordinates value doesn't always match the number of direct subordinate(s) Relates: 389ds#4153 Reviewed by: droideck
Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/51100
Issue Description
The numSubordinates value should give the number of immediate subordinates.
But it could be inaccurate in some cases ( on root entries ).
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
Actual results
The numSubordinates value for the root entry is always higher ( +1 ) than the number of immediate children.
Value of the numSubordinates attribute on the root entry:
$ ldapsearch -LLL -Y EXTERNAL -H 'ldapi://%2fvar%2frun%2fslapd-.socket'
-b "o=test_numSubordinates" -s base "objectclass=*" 1.1 numSubordinates 2> /dev/null
dn: o=test_numsubordinates
numSubordinates: 5
Actual number of direct children:
$ ldapsearch -LLL -Y EXTERNAL -H 'ldapi://%2fvar%2frun%2fslapd-.socket'
-b "o=test_numSubordinates" -s one 1.1 2>/dev/null | grep -c ^dn:
4
Expected results
Both values should be identical.
The text was updated successfully, but these errors were encountered: