Whamcloud - gitweb
LU-18083 utils: handle more than one peer NI per peer
For lnetctl peer list command the loop to parse the returned data
from the kernel ended its loop on the first mapping end event.
This fails since we can have multiple peer ni nids and each one
contains a mapping start and end event. Instead we need to skip
everything until we get an sequence end event which has the
effect of filtering everything but the primary nids which we
want.
Second smaller issue is that yaml_lnet_peer_display() can have
either an emitter or parser error. If it was a emitter error
the code would return back yaml_lnet_peer() would still treat
it as an parse error as well which is incorrect. Make
yaml_lnet_peere_display() return 0 if its a parser error or
-EINVAL if its an emitter error. This way we can handle error
reporting in each case separately.
Test-Parameters: trivial testlist=sanity-lnet
Change-Id: I71372a5b243c5907022a09fb080781d60180dd41
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55944
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>