A device can be in fatal state, if the cable was disconnected, or the
port brought down on the switch side. In these cases, the LND (o2iblnd
for now), will flag the device in fatal state. That device will not be
used any further. However, it's health will not be decremented. This
causes some confusion when examining the state of the node.
It is better to print the device status in the output of the lnetctl
net show command.
Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: I7c635ab1062f6153449fcec1bc07585065818a72
Reviewed-on: https://review.whamcloud.com/44169
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
__u32 hlni_local_no_route;
__u32 hlni_local_timeout;
__u32 hlni_local_error;
+ __s32 hlni_fatal_error;
__s32 hlni_health_value;
__u32 hlni_ping_count;
__u64 hlni_next_ping;
stats->hlni_local_no_route = atomic_read(&ni->ni_hstats.hlt_local_no_route);
stats->hlni_local_timeout = atomic_read(&ni->ni_hstats.hlt_local_timeout);
stats->hlni_local_error = atomic_read(&ni->ni_hstats.hlt_local_error);
+ stats->hlni_fatal_error = atomic_read(&ni->ni_fatal_error_on);
stats->hlni_health_value = atomic_read(&ni->ni_healthv);
stats->hlni_ping_count = ni->ni_ping_count;
stats->hlni_next_ping = ni->ni_next_ping;
yhstats = cYAML_create_object(item, "health stats");
if (!yhstats)
goto out;
+ if (cYAML_create_number(yhstats, "fatal_error",
+ hstats.hlni_fatal_error)
+ == NULL)
+ goto out;
if (cYAML_create_number(yhstats, "health value",
hstats.hlni_health_value)
== NULL)