Whamcloud - gitweb
LU-13939 mgs: warn if nid was not processed during replace_nids 95/39795/7
authorArtem Blagodarenko <c17828@cray.com>
Thu, 4 Jun 2020 14:40:03 +0000 (10:40 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Apr 2021 02:10:16 +0000 (02:10 +0000)
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 <artem.blagodarenko@hpe.com>
Reviewed-on: https://es-gerrit.dev.cray.com/157402
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Tested-by: Alexander Lezhoev <c17454@cray.com>
Reviewed-on: https://review.whamcloud.com/39795
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mgs/mgs_llog.c

index 4a8e158..fb2e175 100644 (file)
@@ -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;
                                }