The Samba-Bugzilla – Attachment 14716 Details for
Bug 13696
ctdbd should exit with an error if a required database directory does not exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.9
BZ13696-4.9.patch (text/plain), 1.84 KB, created by
Martin Schwenke
on 2018-12-05 00:47:09 UTC
(
hide
)
Description:
Patch for 4.9
Filename:
MIME Type:
Creator:
Martin Schwenke
Created:
2018-12-05 00:47:09 UTC
Size:
1.84 KB
patch
obsolete
>From bcd06e0f9e033991c87d74a85763aa76287ea7c0 Mon Sep 17 00:00:00 2001 >From: Martin Schwenke <martin@meltin.net> >Date: Fri, 30 Nov 2018 12:44:26 +1100 >Subject: [PATCH] ctdb-daemon: Exit with error if a database directory does not > exist > >Since 4.9.0, the log messages can be confusing if a required database >directory does not exist. Explicitly check for database directories, >logging a clear error and exiting if one is missing. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13696 > >Signed-off-by: Martin Schwenke <martin@meltin.net> >Reviewed-by: Amitay Isaacs <amitay@gmail.com> > >Autobuild-User(master): Amitay Isaacs <amitay@samba.org> >Autobuild-Date(master): Mon Dec 3 06:56:41 CET 2018 on sn-devel-144 > >(cherry picked from commit dd7574afd1b2fb6a88defa154bc3d15e94f9ce0d) >--- > ctdb/server/ctdbd.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > >diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c >index 721347c4733..45519a7fc3d 100644 >--- a/ctdb/server/ctdbd.c >+++ b/ctdb/server/ctdbd.c >@@ -299,8 +299,28 @@ int main(int argc, const char *argv[]) > */ > > ctdb->db_directory = ctdb_config.dbdir_volatile; >+ ok = directory_exist(ctdb->db_directory); >+ if (! ok) { >+ D_ERR("Volatile database directory %s does not exist\n", >+ ctdb->db_directory); >+ goto fail; >+ } >+ > ctdb->db_directory_persistent = ctdb_config.dbdir_persistent; >+ ok = directory_exist(ctdb->db_directory_persistent); >+ if (! ok) { >+ D_ERR("Persistent database directory %s does not exist\n", >+ ctdb->db_directory_persistent); >+ goto fail; >+ } >+ > ctdb->db_directory_state = ctdb_config.dbdir_state; >+ ok = directory_exist(ctdb->db_directory_state); >+ if (! ok) { >+ D_ERR("State database directory %s does not exist\n", >+ ctdb->db_directory_state); >+ goto fail; >+ } > > if (ctdb_config.lock_debug_script != NULL) { > ret = setenv("CTDB_DEBUG_LOCKS", >-- >2.19.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
amitay
:
review+
Actions:
View
Attachments on
bug 13696
: 14716