LU-10391 ptlrpc: update import debugfs to support IPv6 formats
When mounting with IPv6 NIDs setting the connection will fail with
LustreError: (lproc_ptlrpc.c:1417:ldebugfs_import_seq_write()) config: wrong instance # d967@tcp::1
This is due to IPv6 NIDs being able to contain "::" which is used
as a delimiter. Update the code to search for '@' which is unique
for the NID and then look for "::". For reading the import we need
to quote all the NID strings to make it valid YAML.
This changes the import output from:
import:
name: lustre-MDT0000-mdc-
ffff96c7070a2800
target: lustre-MDT0000_UUID
state: FULL
....
connection:
failover_nids: [ 10.37.248.15@tcp, 192.168.1.100@tcp ]
current_connection: 10.37.248.15@tcp
connection_attempts: 1
generation: 1
in-progress_invalidations: 0
idle: 64 sec
....
to the following:
import:
name: lustre-MDT0000-mdc-
ffff96c7070a2800
target: lustre-MDT0000_UUID
state: FULL
....
connection:
failover_nids: [ "10.37.248.15@tcp", "192.168.1.100@tcp" ]
current_connection: "10.37.248.15@tcp"
connection_attempts: 1
generation: 1
in-progress_invalidations: 0
idle: 64 sec
....
Change-Id: Ie68d544d8733b87d04fa0c2385de2319696b3289
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53117
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>