Whamcloud - gitweb
LU-11469 lnet: fix "debug recovery" output 10/33310/8
authorAmir Shehata <ashehata@whamcloud.com>
Thu, 4 Oct 2018 00:17:03 +0000 (17:17 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 6 Nov 2018 06:41:13 +0000 (06:41 +0000)
Don't print out anything from

lnetctl debug recovery [--local|--peer]

if there are no NIs on the recovery queues.

Test-Parameters: trivial
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: Icf4d5e2f1e3eefafce81dcc73525a4dd9a36d009
Reviewed-on: https://review.whamcloud.com/33310
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/utils/lnetconfig/liblnetconfig.c

index 4978c42..a3d8a5c 100644 (file)
@@ -3476,6 +3476,9 @@ int show_recovery_queue(enum lnet_health_type type, char *name, int seq_no,
                goto out;
        }
 
+       if (nid_list.rlst_num_nids == 0)
+               goto out;
+
        root = cYAML_create_object(NULL, NULL);
        if (root == NULL)
                goto out;