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 984970 - Overflow in nsslapd-disk-monitoring-threshold
Summary: Overflow in nsslapd-disk-monitoring-threshold
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.4
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: ---
Assignee: mreynolds
QA Contact: Sankar Ramalingam
URL:
Whiteboard:
Depends On: 982325
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-16 13:49 UTC by Jan Kurik
Modified: 2013-08-05 10:24 UTC (History)
7 users (show)

Fixed In Version: 389-ds-base-1.2.11.15-20.el6_4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-30 17:01:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1119 0 normal SHIPPED_LIVE Moderate: 389-ds-base security and bug fix update 2013-07-30 20:57:57 UTC

Description Jan Kurik 2013-07-16 13:49:57 UTC
This bug has been copied from bug #982325 and has been proposed
to be backported to 6.4 z-stream (EUS).

Comment 4 Ján Rusnačko 2013-07-22 08:43:21 UTC
Tested on newest version:

[jrusnack@dstet ~]$ rpm -qa | grep 389-
389-ds-base-libs-1.2.11.15-17.el6_4.x86_64
389-ds-base-debuginfo-1.2.11.15-17.el6_4.x86_64
389-ds-base-1.2.11.15-17.el6_4.x86_64
[jrusnack@dstet ~]$ ldapmodify -D "cn=directory manager" -w Secret123 <<EOF
dn: cn=config
changetype: modify
replace: nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: 3000000000
EOF
modifying entry "cn=config"

[jrusnack@dstet ~]$ ldapsearch -D "cn=directory manager" -w Secret123 -b "cn=config" | grep nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: -1294967296

[jrusnack@dstet ~]$ vim /var/log/dirsrv/slapd-dstet/errors
...
[22/Jul/2013:10:27:38 +0200] - Disk space is too low on disk (/), remaining space: 1174676 Kb
[22/Jul/2013:10:27:38 +0200] - Disk space on (/) is too far below the threshold(3000000000 bytes).  Waiting 1 minutes for disk space to be cleaned up before shutting slapd down...

So the threshold was set correctly and disk monitoring works, but ldapsearch shows negative value.

[jrusnack@dstet ~]$ ldapmodify -D "cn=directory manager" -w Secret123 <<EOF
dn: cn=config
changetype: modify
replace: nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: 3000
EOF

modifying entry "cn=config"
ldap_modify: Operations error (1)
	additional info: nsslapd-disk-monitoring-threshold: "3000" is invalid, threshold must be greater than 4096 and less then 4294967295

So the maximum value seems to be 4294967295.

[jrusnack@dstet ~]$ ldapmodify -D "cn=directory manager" -w Secret123 <<EOF
dn: cn=config
changetype: modify
replace: nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: 4294967295
EOF

modifying entry "cn=config"

[jrusnack@dstet ~]$ ldapsearch -D "cn=directory manager" -w Secret123 -b "cn=config" | grep nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: -1
[jrusnack@dstet ~]$ cat /etc/dirsrv/slapd-dstet/dse.ldif | grep nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: 4294967295

Comment 5 mreynolds 2013-07-22 14:35:58 UTC
The value is stored, and used correctly internally.  Using ldapsearch tries to cast the value to an integer(which of course overflows), that's why you see the negative number when using ldapsearch.  It's a simple fix, working on the respin...

Comment 7 Ján Rusnačko 2013-07-25 09:54:43 UTC
[jrusnack@dstet 6.0]$ ldapmodify -h localhost -p 19741 -D "cn=directory manager" -w Secret123 <<EOF
dn: cn=config
changetype: modify
replace: nsslapd-disk-monitoring-threshold
nsslapd-disk-monitoring-threshold: -2
EOF
modifying entry "cn=config"

[jrusnack@dstet 6.0]$ ldapsearch -h localhost -p 19741 -D "cn=directory manager" -w Secret123 -b "cn=config" -s base -LLL nsslapd-disk-monitoring-threshold
dn: cn=config
nsslapd-disk-monitoring-threshold: -2

[jrusnack@dstet 6.0]$ rpm -qa | grep 389
389-ds-base-debuginfo-1.2.11.15-18.el6_4.x86_64
389-ds-base-libs-1.2.11.15-18.el6_4.x86_64
389-ds-base-1.2.11.15-18.el6_4.x86_64

Negative values should be refused - see comment #3.

Another unrelated minor issue:

"Available disk space is now acceptable (0 bytes).  Aborting shutdown, and restoring the log settings."

The error message from log, that notifies about abort of shutdown, should probably contain information about free space, instead of '0 bytes'.

Comment 8 mreynolds 2013-07-25 14:20:15 UTC
(In reply to Ján Rusnačko from comment #7)
> [jrusnack@dstet 6.0]$ ldapmodify -h localhost -p 19741 -D "cn=directory
> manager" -w Secret123 <<EOF
> dn: cn=config
> changetype: modify
> replace: nsslapd-disk-monitoring-threshold
> nsslapd-disk-monitoring-threshold: -2
> EOF
> modifying entry "cn=config"
> 
> [jrusnack@dstet 6.0]$ ldapsearch -h localhost -p 19741 -D "cn=directory
> manager" -w Secret123 -b "cn=config" -s base -LLL
> nsslapd-disk-monitoring-threshold
> dn: cn=config
> nsslapd-disk-monitoring-threshold: -2
> 
> [jrusnack@dstet 6.0]$ rpm -qa | grep 389
> 389-ds-base-debuginfo-1.2.11.15-18.el6_4.x86_64
> 389-ds-base-libs-1.2.11.15-18.el6_4.x86_64
> 389-ds-base-1.2.11.15-18.el6_4.x86_64
> 
> Negative values should be refused - see comment #3.
> 
> Another unrelated minor issue:
> 
> "Available disk space is now acceptable (0 bytes).  Aborting shutdown, and
> restoring the log settings."
> 
> The error message from log, that notifies about abort of shutdown, should
> probably contain information about free space, instead of '0 bytes'.


Did you restart the server after making the config change?

Comment 9 Ján Rusnačko 2013-07-25 18:01:28 UTC
(In reply to mreynolds from comment #8)
> (In reply to Ján Rusnačko from comment #7)
> > [jrusnack@dstet 6.0]$ ldapmodify -h localhost -p 19741 -D "cn=directory
> > manager" -w Secret123 <<EOF
> > dn: cn=config
> > changetype: modify
> > replace: nsslapd-disk-monitoring-threshold
> > nsslapd-disk-monitoring-threshold: -2
> > EOF
> > modifying entry "cn=config"
> > 
> > [jrusnack@dstet 6.0]$ ldapsearch -h localhost -p 19741 -D "cn=directory
> > manager" -w Secret123 -b "cn=config" -s base -LLL
> > nsslapd-disk-monitoring-threshold
> > dn: cn=config
> > nsslapd-disk-monitoring-threshold: -2
> > 
> > [jrusnack@dstet 6.0]$ rpm -qa | grep 389
> > 389-ds-base-debuginfo-1.2.11.15-18.el6_4.x86_64
> > 389-ds-base-libs-1.2.11.15-18.el6_4.x86_64
> > 389-ds-base-1.2.11.15-18.el6_4.x86_64
> > 
> > Negative values should be refused - see comment #3.
> > 
> > Another unrelated minor issue:
> > 
> > "Available disk space is now acceptable (0 bytes).  Aborting shutdown, and
> > restoring the log settings."
> > 
> > The error message from log, that notifies about abort of shutdown, should
> > probably contain information about free space, instead of '0 bytes'.
> 
> 
> Did you restart the server after making the config change?
No. The three commands above were executed in sequence.

Comment 10 Ján Rusnačko 2013-07-29 14:20:08 UTC
Verified on 389-ds-base-1.2.11.15-20.el6_4.x86_64

Comment 12 errata-xmlrpc 2013-07-30 17:01:57 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.

http://rhn.redhat.com/errata/RHSA-2013-1119.html


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