|
|
1bb595 |
From be8052bbb61c572702fe16e2850539f445dcc0e2 Mon Sep 17 00:00:00 2001
|
|
|
1bb595 |
From: Alexey Tikhonov <atikhono@redhat.com>
|
|
|
1bb595 |
Date: Wed, 4 Mar 2020 22:13:52 +0100
|
|
|
1bb595 |
Subject: [PATCH 31/35] NSS: enhanced debug during mem-cache initialization
|
|
|
1bb595 |
|
|
|
1bb595 |
Reviewed-by: Sumit Bose <sbose@redhat.com>
|
|
|
1bb595 |
---
|
|
|
1bb595 |
src/responder/nss/nsssrv.c | 39 ++++++++++++++++++++++++++++++++------
|
|
|
1bb595 |
1 file changed, 33 insertions(+), 6 deletions(-)
|
|
|
1bb595 |
|
|
|
1bb595 |
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c
|
|
|
1bb595 |
index 0a201d3ae..42a63d9bb 100644
|
|
|
1bb595 |
--- a/src/responder/nss/nsssrv.c
|
|
|
1bb595 |
+++ b/src/responder/nss/nsssrv.c
|
|
|
1bb595 |
@@ -255,7 +255,8 @@ static int setup_memcaches(struct nss_ctx *nctx)
|
|
|
1bb595 |
&mc_size_passwd);
|
|
|
1bb595 |
if (ret != EOK) {
|
|
|
1bb595 |
DEBUG(SSSDBG_FATAL_FAILURE,
|
|
|
1bb595 |
- "Failed to get 'memcache_size_passwd' option from confdb.\n");
|
|
|
1bb595 |
+ "Failed to get '"CONFDB_NSS_MEMCACHE_SIZE_PASSWD
|
|
|
1bb595 |
+ "' option from confdb.\n");
|
|
|
1bb595 |
return ret;
|
|
|
1bb595 |
}
|
|
|
1bb595 |
|
|
|
1bb595 |
@@ -266,7 +267,8 @@ static int setup_memcaches(struct nss_ctx *nctx)
|
|
|
1bb595 |
&mc_size_group);
|
|
|
1bb595 |
if (ret != EOK) {
|
|
|
1bb595 |
DEBUG(SSSDBG_FATAL_FAILURE,
|
|
|
1bb595 |
- "Failed to get 'memcache_size_group' option from confdb.\n");
|
|
|
1bb595 |
+ "Failed to get '"CONFDB_NSS_MEMCACHE_SIZE_GROUP
|
|
|
1bb595 |
+ "' option from confdb.\n");
|
|
|
1bb595 |
return ret;
|
|
|
1bb595 |
}
|
|
|
1bb595 |
|
|
|
1bb595 |
@@ -277,7 +279,8 @@ static int setup_memcaches(struct nss_ctx *nctx)
|
|
|
1bb595 |
&mc_size_initgroups);
|
|
|
1bb595 |
if (ret != EOK) {
|
|
|
1bb595 |
DEBUG(SSSDBG_FATAL_FAILURE,
|
|
|
1bb595 |
- "Failed to get 'memcache_size_nitgroups' option from confdb.\n");
|
|
|
1bb595 |
+ "Failed to get '"CONFDB_NSS_MEMCACHE_SIZE_INITGROUPS
|
|
|
1bb595 |
+ "' option from confdb.\n");
|
|
|
1bb595 |
return ret;
|
|
|
1bb595 |
}
|
|
|
1bb595 |
|
|
|
1bb595 |
@@ -291,8 +294,16 @@ static int setup_memcaches(struct nss_ctx *nctx)
|
|
|
1bb595 |
(time_t)memcache_timeout,
|
|
|
1bb595 |
&nctx->pwd_mc_ctx);
|
|
|
1bb595 |
if (ret) {
|
|
|
1bb595 |
- DEBUG(SSSDBG_CRIT_FAILURE, "passwd mmap cache is DISABLED\n");
|
|
|
1bb595 |
+ DEBUG(SSSDBG_CRIT_FAILURE,
|
|
|
1bb595 |
+ "Failed to initialize passwd mmap cache: '%s'\n",
|
|
|
1bb595 |
+ sss_strerror(ret));
|
|
|
1bb595 |
+ } else {
|
|
|
1bb595 |
+ DEBUG(SSSDBG_CONF_SETTINGS, "Passwd mmap cache size is %d\n",
|
|
|
1bb595 |
+ mc_size_passwd);
|
|
|
1bb595 |
}
|
|
|
1bb595 |
+ } else {
|
|
|
1bb595 |
+ DEBUG(SSSDBG_IMPORTANT_INFO,
|
|
|
1bb595 |
+ "Passwd mmap cache is explicitly DISABLED\n");
|
|
|
1bb595 |
}
|
|
|
1bb595 |
|
|
|
1bb595 |
if (mc_size_group != 0) {
|
|
|
1bb595 |
@@ -303,8 +314,16 @@ static int setup_memcaches(struct nss_ctx *nctx)
|
|
|
1bb595 |
(time_t)memcache_timeout,
|
|
|
1bb595 |
&nctx->grp_mc_ctx);
|
|
|
1bb595 |
if (ret) {
|
|
|
1bb595 |
- DEBUG(SSSDBG_CRIT_FAILURE, "group mmap cache is DISABLED\n");
|
|
|
1bb595 |
+ DEBUG(SSSDBG_CRIT_FAILURE,
|
|
|
1bb595 |
+ "Failed to initialize group mmap cache: '%s'\n",
|
|
|
1bb595 |
+ sss_strerror(ret));
|
|
|
1bb595 |
+ } else {
|
|
|
1bb595 |
+ DEBUG(SSSDBG_CONF_SETTINGS, "Group mmap cache size is %d\n",
|
|
|
1bb595 |
+ mc_size_group);
|
|
|
1bb595 |
}
|
|
|
1bb595 |
+ } else {
|
|
|
1bb595 |
+ DEBUG(SSSDBG_IMPORTANT_INFO,
|
|
|
1bb595 |
+ "Group mmap cache is explicitly DISABLED\n");
|
|
|
1bb595 |
}
|
|
|
1bb595 |
|
|
|
1bb595 |
if (mc_size_initgroups != 0) {
|
|
|
1bb595 |
@@ -315,8 +334,16 @@ static int setup_memcaches(struct nss_ctx *nctx)
|
|
|
1bb595 |
(time_t)memcache_timeout,
|
|
|
1bb595 |
&nctx->initgr_mc_ctx);
|
|
|
1bb595 |
if (ret) {
|
|
|
1bb595 |
- DEBUG(SSSDBG_CRIT_FAILURE, "initgroups mmap cache is DISABLED\n");
|
|
|
1bb595 |
+ DEBUG(SSSDBG_CRIT_FAILURE,
|
|
|
1bb595 |
+ "Failed to initialize initgroups mmap cache: '%s'\n",
|
|
|
1bb595 |
+ sss_strerror(ret));
|
|
|
1bb595 |
+ } else {
|
|
|
1bb595 |
+ DEBUG(SSSDBG_CONF_SETTINGS, "Initgroups mmap cache size is %d\n",
|
|
|
1bb595 |
+ mc_size_initgroups);
|
|
|
1bb595 |
}
|
|
|
1bb595 |
+ } else {
|
|
|
1bb595 |
+ DEBUG(SSSDBG_IMPORTANT_INFO,
|
|
|
1bb595 |
+ "Initgroups mmap cache is explicitly DISABLED\n");
|
|
|
1bb595 |
}
|
|
|
1bb595 |
|
|
|
1bb595 |
return EOK;
|
|
|
1bb595 |
--
|
|
|
1bb595 |
2.21.3
|
|
|
1bb595 |
|