andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
dc8c34
From 1d7b8e00c8798ecfdc378f4297e958b9400c9234 Mon Sep 17 00:00:00 2001
dc8c34
From: Mark Reynolds <mreynolds@redhat.com>
dc8c34
Date: Mon, 22 Jul 2013 15:36:49 -0400
dc8c34
Subject: [PATCH 88/99] Ticket 47441 - Disk Monitoring not checking filesystem
dc8c34
 with logs
dc8c34
dc8c34
Bug Description:  If logging is not set to critical, then the log directories
dc8c34
                  are not checked for available diskspace.
dc8c34
dc8c34
Fix Description:  Remove the "logging_critical" check, and always include the
dc8c34
                  log directories.
dc8c34
dc8c34
https://fedorahosted.org/389/ticket/47441
dc8c34
dc8c34
Reviewed by: richm(Thanks!)
dc8c34
(cherry picked from commit 0ac4187eb5e1d4551a955196e649aca47aa3ea1a)
dc8c34
---
dc8c34
 ldap/servers/slapd/daemon.c | 11 +++--------
dc8c34
 1 file changed, 3 insertions(+), 8 deletions(-)
dc8c34
dc8c34
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
dc8c34
index 8f147f1..221b156 100644
dc8c34
--- a/ldap/servers/slapd/daemon.c
dc8c34
+++ b/ldap/servers/slapd/daemon.c
dc8c34
@@ -600,14 +600,6 @@ disk_mon_get_dirs(char ***list, int logs_critical){
dc8c34
     char *cookie = NULL;
dc8c34
     char *dir = NULL;
dc8c34
 
dc8c34
-    if(logs_critical){
dc8c34
-        slapi_rwlock_rdlock(config->cfg_rwlock);
dc8c34
-        disk_mon_add_dir(list, config->accesslog);
dc8c34
-        disk_mon_add_dir(list, config->errorlog);
dc8c34
-        disk_mon_add_dir(list, config->auditlog);
dc8c34
-        slapi_rwlock_unlock(config->cfg_rwlock);
dc8c34
-    }
dc8c34
-
dc8c34
     /* Add /var just to be safe */
dc8c34
 #ifdef LOCALSTATEDIR
dc8c34
     disk_mon_add_dir(list, LOCALSTATEDIR);
dc8c34
@@ -618,6 +610,9 @@ disk_mon_get_dirs(char ***list, int logs_critical){
dc8c34
     /* config and backend directories */
dc8c34
     slapi_rwlock_rdlock(config->cfg_rwlock);
dc8c34
     disk_mon_add_dir(list, config->configdir);
dc8c34
+    disk_mon_add_dir(list, config->accesslog);
dc8c34
+    disk_mon_add_dir(list, config->errorlog);
dc8c34
+    disk_mon_add_dir(list, config->auditlog);
dc8c34
     slapi_rwlock_unlock(config->cfg_rwlock);
dc8c34
 
dc8c34
     be = slapi_get_first_backend (&cookie);
dc8c34
-- 
dc8c34
1.8.1.4
dc8c34