From 3c7b5ab34878df27c3e5b05aea81bbbc53b68d58 Mon Sep 17 00:00:00 2001 From: Artem Blagodarenko Date: Thu, 4 Jun 2020 10:40:03 -0400 Subject: [PATCH] LU-13939 mgs: warn if nid was not processed during replace_nids process_command() trying to add configuration for each uuid from list and do not show any message if record_add_uuid() fails. This can lead to misunderstanding during configuration. Add warning message if nid can not be added. Change-Id: Id0a7216daf3eb7e1b8f94eaebd42624b309049d0 hpe-bug-id: LUS-2653 Signed-off-by: Artem Blagodarenko Reviewed-on: https://es-gerrit.dev.cray.com/157402 Reviewed-by: Vladimir Saveliev Reviewed-by: Alexander Boyko Tested-by: Alexander Lezhoev Reviewed-on: https://review.whamcloud.com/39795 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alexander Boyko Reviewed-by: Oleg Drokin --- lustre/mgs/mgs_llog.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c index 4a8e158..fb2e175 100644 --- a/lustre/mgs/mgs_llog.c +++ b/lustre/mgs/mgs_llog.c @@ -1148,7 +1148,12 @@ static int process_command(const struct lu_env *env, struct lustre_cfg *lcfg, rc = record_add_uuid(env, mrd->temp_llh, nid, mrd->nodeuuid); - if (!rc) + if (rc) + CWARN("%s: Can't add nid %s for uuid %s :rc=%d\n", + mrd->target.mti_svname, + libcfs_nid2str(nid), + mrd->nodeuuid, rc); + else nids_added++; if (*ptr == ':') { @@ -1205,6 +1210,10 @@ static int process_command(const struct lu_env *env, struct lustre_cfg *lcfg, rc = record_add_uuid(env, mrd->temp_llh, nid, mrd->nodeuuid); if (rc) { + CWARN("%s: Can't add nid %s for failover %s :rc = %d\n", + mrd->target.mti_svname, + libcfs_nid2str(nid), + mrd->nodeuuid, rc); name_destroy(&mrd->nodeuuid); return rc; } -- 1.8.3.1