The gnilnd receives node health information asynchronous from any tx
failure, so aliveness of lpni as reported by lnet_is_peer_ni_alive()
may not match what LND is telling us. Use existing reset flag to
set cached NI status down so we can be sure that remote NIs are
correctly set down.
Test-Parameters: trivial
HPE-bug-id: LUS-8897
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I1ab36b63d83fb35803eb13a330d698cfa49f17e9
Reviewed-on: https://review.whamcloud.com/38862
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
peer, libcfs_nid2str(peer_nid), peer->gnp_last_alive,
ktime_get_seconds() - peer->gnp_last_alive);
peer, libcfs_nid2str(peer_nid), peer->gnp_last_alive,
ktime_get_seconds() - peer->gnp_last_alive);
- lnet_notify(net->gnn_ni, peer_nid, alive,
- (alive) ? true : false,
+ lnet_notify(net->gnn_ni, peer_nid, alive, true,
peer->gnp_last_alive);
kgnilnd_net_decref(net);
peer->gnp_last_alive);
kgnilnd_net_decref(net);
time64_t now = ktime_get_seconds();
int cpt;
time64_t now = ktime_get_seconds();
int cpt;
- LASSERT (!in_interrupt ());
+ LASSERT(!in_interrupt());
- CDEBUG (D_NET, "%s notifying %s: %s\n",
- (ni == NULL) ? "userspace" : libcfs_nid2str(ni->ni_nid),
- libcfs_nid2str(nid),
- alive ? "up" : "down");
+ CDEBUG(D_NET, "%s notifying %s: %s\n",
+ (ni == NULL) ? "userspace" : libcfs_nid2str(ni->ni_nid),
+ libcfs_nid2str(nid), alive ? "up" : "down");
if (ni != NULL &&
LNET_NIDNET(ni->ni_nid) != LNET_NIDNET(nid)) {
if (ni != NULL &&
LNET_NIDNET(ni->ni_nid) != LNET_NIDNET(nid)) {
if (alive) {
if (reset) {
if (alive) {
if (reset) {
+ lpni->lpni_ns_status = LNET_NI_STATUS_UP;
lnet_set_lpni_healthv_locked(lpni,
LNET_MAX_HEALTH_VALUE);
} else {
lnet_set_lpni_healthv_locked(lpni,
LNET_MAX_HEALTH_VALUE);
} else {
(sensitivity) ? sensitivity :
lnet_health_sensitivity);
}
(sensitivity) ? sensitivity :
lnet_health_sensitivity);
}
+ } else if (reset) {
+ lpni->lpni_ns_status = LNET_NI_STATUS_DOWN;
}
/* recalculate aliveness */
}
/* recalculate aliveness */