ctdbd: Log PID file creation and removal at NOTICE level
authorMartin Schwenke <martin@meltin.net>
Mon, 22 Apr 2013 03:52:04 +0000 (13:52 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Mon, 22 Apr 2013 04:21:14 +0000 (14:21 +1000)
Unexpected removal of this file can have serious consequences, so it
is best if this is logged at the default level.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit bfed6a8d1771db3401d12b819204736c33acb312)

server/ctdb_daemon.c

index 2930e08a3c6debf28cda40d37c46e5c46220cd1e..b95995367cf29edd4883ef5ff9ad5429a43367df 100644 (file)
@@ -1072,8 +1072,8 @@ static void ctdb_remove_pidfile(void)
 {
        if (ctdbd_pidfile != NULL && !ctdb_is_child_process()) {
                if (unlink(ctdbd_pidfile) == 0) {
-                       DEBUG(DEBUG_INFO, ("Removed PID file %s\n",
-                                          ctdbd_pidfile));
+                       DEBUG(DEBUG_NOTICE, ("Removed PID file %s\n",
+                                            ctdbd_pidfile));
                } else {
                        DEBUG(DEBUG_WARNING, ("Failed to Remove PID file %s\n",
                                              ctdbd_pidfile));
@@ -1095,7 +1095,7 @@ static void ctdb_create_pidfile(pid_t pid)
 
                fprintf(fp, "%d\n", pid);
                fclose(fp);
-               DEBUG(DEBUG_INFO, ("Created PID file %s\n", ctdbd_pidfile));
+               DEBUG(DEBUG_NOTICE, ("Created PID file %s\n", ctdbd_pidfile));
                atexit(ctdb_remove_pidfile);
        }
 }