LU-18063 lnet: restore LNet NI dropped information
In testing setting up 2 different LNet nets, tcp1 and tcp2,
revealed two bugs.
The first network was setup using the interface and defaults
to the specified net (tcp1) and the second was setup with a
specific NID (xxx@tcp2). In the case of setup with a specific
NID no interface was provided and it was not found. This was
due to checking only for NULL interface names. Adding checks
for zero length strings also ensures an interface will always
be set for NI.
The next bug observed was the loss of lnd tunable information
with multiple LNet nets. This information is contained in
struct lnet_lnd for each specific LND driver. In the current
code while looping over all the nets we check if the struct
lnet_lnd has changed. It was clearing the local lnd pointer
on no change to avoid sending the same key table multiple
times. We want to only send a new key table if the lnet_lnd
has changed. Later in the inner loop we use the same
struct lnet_lnd to enquire about LND specific information but
since it was set to NULL earlier we can't collect this data.
Introduce a flag instead to avoid sending the key table and
keep around the lnd for data collection.
Test-Parameters: trivial testlist=sanity-lnet
Fixes:
d15bfca078 ("LU-10391 lnet: migrate full LNet NI information collection")
Fixes:
fff650726b ("LU-13642 lnet: Allow dynamic IP specification")
Change-Id: Ibeb908b106ff0331e1c09249811b3a8a2d7f345e
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55975
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>