Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 918689

Summary: Cannot dynamically set nsslapd-maxbersize
Product: Red Hat Enterprise Linux 7 Reporter: Nathan Kinder <nkinder>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Sankar Ramalingam <sramling>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.0CC: amsharma, jgalipea, nhosoi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.1.2-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 09:55:06 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:

Description Nathan Kinder 2013-03-06 18:13:22 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/542

This bug effects directory initializations when the membersize exceeds the default value.  For example, a dogtag replica installation with a large CRL entry will fail due to the size exceeding 2097152 bytes.

Comment 1 Rich Megginson 2013-10-01 23:25:11 UTC
moving all ON_QA bugs to MODIFIED in order to add them to the errata (can't add bugs in the ON_QA state to an errata).  When the errata is created, the bugs should be automatically moved back to ON_QA.

Comment 5 Amita Sharma 2014-01-02 10:22:31 UTC
UseCase 1
=============
[root@dhcp201-149 ~]# ldapsearch -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 -b "cn=config" | grep -i "nsslapd-maxbersize"
nsslapd-maxbersize: 0

ldapadd -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 -f /export/a.ldif

[root@dhcp201-149 ~]# cat /export/a.ldif 
# Jennifer's Entry
dn: cn=Jennifer J Jensen, dc=example, dc=com
cn: Jennifer J Jensen
cn: Jennifer Jensen
objectClass: person
sn: Jensen
jpegPhoto:< file:/export/DSC04006.JPG

[root@dhcp201-149 export]# tail -f /var/log/dirsrv/slapd-dhcp201-149/access
[02/Jan/2014:14:52:15 +051800] conn=11 op=-1 fd=64 closed error 34 (Numerical result out of range) - B2

^C
[root@dhcp201-149 export]# tail -f /var/log/dirsrv/slapd-dhcp201-149/errors
[02/Jan/2014:14:52:15 +051800] connection - conn=11 fd=64 Incoming BER Element was too long, max allowable is 2097152 bytes. Change the nsslapd-maxbersize attribute in cn=config to increase.

UseCase2
==========
[root@dhcp201-149 ~]# ldapsearch -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 -b "cn=config" | grep -i "nsslapd-maxbersize"
nsslapd-maxbersize: 0

[root@dhcp201-149 ~]# ldapmodify -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 << EOF
dn: cn=config
changetype: modify
replace: nsslapd-maxbersize
nsslapd-maxbersize: 2147483647
EOF
modifying entry "cn=config"

[root@dhcp201-149 ~]# ldapsearch -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 -b "cn=config" | grep -i "nsslapd-maxbersize"
nsslapd-maxbersize: 214748364

[root@dhcp201-149 ~]# ldapadd -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 -f /export/a.ldif
adding new entry "cn=Jennifer1 J Jensen, dc=example, dc=com"

[root@dhcp201-149 ~]# cat /export/a.ldif 
# Jennifer's Entry
dn: cn=Jennifer1 J Jensen, dc=example, dc=com
cn: Jennifer J Jensen
objectClass: person
objectClass: inetOrgPerson
sn: Jensen
jpegPhoto:< file:/export/DSC04006.JPG

UseCase3 - Invalid Value for nsslapd-maxbersize
==============================================
[root@dhcp201-149 ~]# ldapmodify -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 << EOF
> dn: cn=config
> changetype: modify
> replace: nsslapd-maxbersize
> nsslapd-maxbersize: 2,147,483,647
> EOF
modifying entry "cn=config"

[root@dhcp201-149 ~]# ldapadd -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 -f /export/a.ldif
adding new entry "cn=Jennifer1 J Jensen, dc=example, dc=com"
ldapadd: update failed: cn=Jennifer1 J Jensen, dc=example, dc=com
ldap_add: Can't contact LDAP server (-1)

AND for all other LDAP operation it will give :: 
ldap_result: Can't contact LDAP server (-1)

Access Logs ::
[02/Jan/2014:15:20:28 +051800] conn=9 op=0 RESULT err=0 tag=97 nentries=0 etime=0 dn="cn=directory manager"
[02/Jan/2014:15:20:28 +051800] conn=9 op=-1 fd=64 closed error 34 (Numerical result out of range) - B2

Error Logs ::
[02/Jan/2014:15:20:28 +051800] connection - conn=9 fd=64 Incoming BER Element was too long, max allowable is 2097152 bytes. Change the nsslapd-maxbersize attribute in cn=config to increase.

So should I close this one and open another one for this issue?

Comment 6 Noriko Hosoi 2014-01-02 17:22:19 UTC
Amita,

> So should I close this one and open another one for this issue?

Yes, please do so.  (Please note that this use case 3 issue is not regression.)
config_set_maxbersize converts the input string using "atoi", which does 2,147,483,647 into 2.

Thanks!

Comment 7 Amita Sharma 2014-01-03 08:48:46 UTC
Thanks Noriko.
Based on comment https://bugzilla.redhat.com/show_bug.cgi?id=918689#c6 , marking this bug as VERIFIED and opened https://bugzilla.redhat.com/show_bug.cgi?id=1048116

Comment 8 Amita Sharma 2014-05-26 07:00:25 UTC
[svrbld@dhcp201-149 accept]$ svn ci accept.sh -m "trac47606_0 :: This test case covers bug918689 too"
Sending        accept.sh
Transmitting file data .
Committed revision 8745.

Comment 9 Ludek Smid 2014-06-13 09:55:06 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.