Original Pre-Health
...
Requirements
Router Requirements
A router is a node which has the routing feature turned on using lnetctl set routing 1
or the equivalent modprobe configuration.
...
- Keep track of the last time the peer was alive,
lpni_last_alive
- Keep track the last time the peer was notified that its state has changed,
lpni_timestamp
- The peer can change state under the following conditions:
- The LND notifies that the peer is down when it fails to send a message to the peer.
- As an example in o2iblnd:
- kiblnd_peer_connect_failed() and kiblnd_disconnect_conn() call kiblnd_peer_notify() which calls lnet_notify() to set the peer to
dead
if there was an error
- kiblnd_peer_connect_failed() and kiblnd_disconnect_conn() call kiblnd_peer_notify() which calls lnet_notify() to set the peer to
- As an example in o2iblnd:
- A message is received in
lnet_parse()
- In this case the peer stat is set to alive only for gateway peer NIs
- When the router checker ping is responded to or it fails.
- If the router checker ping times out.
- The LND notifies that the peer is down when it fails to send a message to the peer.
- The peer can change state under the following conditions:
- This step only concerns routers: Only send the message if the peer is alive, determined as outlined above.
- On the router if the NI hasn't received any traffic for a period of
router_ping_timeout + MAX(live_router_check_interval, dead_router_check_interval)
then it's marked down.- This is done in order for the peers using the router to mark the peer down when the
avoid_asym_router_failure
is set to 1, which it is by default.
- This is done in order for the peers using the router to mark the peer down when the
LNet Multi-Rail
Multi-Rail introduced the concept of a peer and a peer NI. A peer can have multiple peer NIs. This changes the semantics of route configuration. Currently a route can be configured as:
Code Block |
---|
lnetctl route add --net <remote net> --gateway <gateway-peer-NID> |
The gateway-peer-NID refers to a specific interface on the router. However with MR enabled on the router, multiple interfaces can be configured on the same network. Therefore, the configuration semantics should be as follows:
Code Block |
---|
lnetctl route add --net <remote net> --gateway <gateway-primary-NID> |
When a route is entered the primary NID specified in the gateway parameter should be immediately discovered. The discovery process will determine all the interfaces available on the router. There could be multiple interfaces on the same network.
A route should only be marked down if all the interfaces on the primary NID's network are down.
Nodes on different networks will use different primary NIDs to refer to the same router. IE a primary NID is only a representation of the router on the peer with the route configured.
LNet Resiliency
The LNet Health/Resiliency feature has added the following features:
- Track a local NI or a peer NI health.
- Re-send messages
- Recover local NIs or peer NIs by pinging them every second.
The original route code which implements the requirements outlined above are no longer inline with the new mechanisms implemented. There needs to be an effort taken to bring the router code more inline with the new features implemented.
Some details were documented here: Routing and MR integration