#47385 DS not shutting down when disk monitoring threshold is reached to half
Closed: wontfix Opened by nkinder.

DS is not shutting down when disk monitoring threshold is reached to half.

Steps to Reproduce:
1. Configure dse.ldif for disk monitoring with higher threashold
nsslapd-disk-monitoring-threshold: 5242880
nsslapd-disk-monitoring: on

  1. configure nsslapd-disk-monitoring-logging-critical so that DS shuts down
    instead of stop logging audit & access logs
    nsslapd-disk-monitoring-logging-critical: on

3.
Actual results:
Keeps putting the same message every 10 seconds
[30/May/2013:14:24:58 +0200] - Disk space is low on disk (/var/log), remaining
space: 36212 Kb, setting error loglevel to zero.
[30/May/2013:14:25:08 +0200] - Disk space is low on disk (/var/log), remaining
space: 36212 Kb, setting error loglevel to zero.
[30/May/2013:14:25:18 +0200] - Disk space is low on disk (/var/log), remaining
space: 36212 Kb, setting error loglevel to zero.
[30/May/2013:14:25:28 +0200] - Disk space is low on disk (/var/log), remaining
space: 36212 Kb, setting error loglevel to zero

Expected results:
[28/May/2013:18:48:10 -0400] - Disk space is too low on disk (/var), remaining
space: 2920 Kb, disabling access and audit logging.
[28/May/2013:19:00:01 -0400] - Disk space is too low on disk (/var), remaining
space: 2968 Kb, deleting rotated logs.
[28/May/2013:19:00:11 -0400] - Disk space on (/var) is too far below the
threshold(20971520 bytes). Waiting 1 minutes for disk space to be cleaned up
before shutting slapd down...
[28/May/2013:19:01:11 -0400] - Disk space is still too low (2960 Kb).
Signaling slapd for shutdown...
[28/May/2013:19:01:11 -0400] - slapd shutting down - signaling operation
threads
[28/May/2013:19:01:11 -0400] - slapd shutting down - closing down internal
subsystems and plugins
[28/May/2013:19:01:11 -0400] - Waiting for 4 database threads to stop
[28/May/2013:19:01:12 -0400] - All database threads now stopped
[28/May/2013:19:01:12 -0400] - slapd stopped.

Additional info:
It shut down properly when nsslapd-disk-monitoring-threshold is configured as
default 2 mb.

It would be nice if besides ns-slapd exit also the lockfile is removed (what
happens when you do dirsrv stop)


Actually there might be something else going wrong. That error message should not be repeating every 10 seconds, because it supposed to turn off verbose logging. If its turned off, its not suppose to keep logging that same message.

git merge ticket47385
Updating 383cc74..fcd2ceb
Fast-forward
ldap/servers/slapd/daemon.c | 31 ++++++++++++++++++++-----------
ldap/servers/slapd/libglobs.c | 30 ------------------------------
ldap/servers/slapd/proto-slap.h | 2 --
ldap/servers/slapd/slap.h | 2 --
4 files changed, 20 insertions(+), 45 deletions(-)

git push origin master

383cc74..fcd2ceb master -> master

commit fcd2cebe7672f7d746762e9355815ebfb8f56eae

1.3.1

f77de00..2f83f1c  389-ds-base-1.3.1 -> 389-ds-base-1.3.1

1.3.0

6f8cdf7..f315d67  389-ds-base-1.3.0 -> 389-ds-base-1.3.0

commit f315d67449463359301ef9cb2d714e9f264f293f

1.2.11

79739bd..70c5bc1 389-ds-base-1.2.11 -> 389-ds-base-1.2.11

commit 70c5bc1a4ff2131fc05bf5e32ba751e6090531ea

Reopening, if a large chunk of disk space is consumed that would put the server below the halfway mark of the threshold at one shot, the server will not shutdown as expected.

There was an integer overflow for the halfway mark
0001-Ticket-47385-Disk-Monitoring-is-not-triggered-as-exp.patch

git merge ticket47385
Updating b573d80..8486837
Fast-forward
ldap/servers/slapd/daemon.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)

git push origin master
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 863 bytes, done.
Total 6 (delta 4), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
b573d80..8486837 master -> master

commit 8486837842cd6779918520a17ca7c48441fe493b

1.3.1

2e1d633..ad8f908 389-ds-base-1.3.1 -> 389-ds-base-1.3.1

1.3.0

1987727..49ed254 389-ds-base-1.3.0 -> 389-ds-base-1.3.0

1.2.11

489de18..cd5bfad 389-ds-base-1.2.11 -> 389-ds-base-1.2.11

Metadata Update from @mreynolds:
- Issue assigned to mreynolds
- Issue set to the milestone: 1.2.11.22

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/722

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

Metadata