-
Bug
-
Resolution: Unresolved
-
Trivial
-
None
-
Lustre 2.17.0
-
None
-
4
-
9223372036854775807
Stumbled upon this while testing something else.
When given a filename, lnetctl export --backup writes the peer section to stdout instead of the requested file. Reproduced on Lustre 2.17.59 over TCP
sudo lnetctl export --backup /tmp/lnet-before-file.yaml peer: - primary nid: 10.10.0.10@tcp Multi-Rail: true peer ni: - nid: 10.10.0.10@tcp - primary nid: 10.10.0.21@tcp Multi-Rail: true peer ni: - nid: 10.10.0.21@tcp - primary nid: 10.10.0.22@tcp Multi-Rail: true peer ni: - nid: 10.10.0.22@tcp - primary nid: 10.10.0.20@tcp Multi-Rail: true peer ni: - nid: 10.10.0.20@tcp grep -A5 '^peer:' /tmp/lnet-before-file.yaml
The grep command returns no output.
Test with fix:
sudo ./lnet/utils/lnetctl export --backup /tmp/lnet-fixed-file.yaml [root@lustre-client1 lustre-release]# grep -A5 '^peer:' /tmp/lnet-fixed-file.yaml peer: - primary nid: 10.10.0.10@tcp Multi-Rail: true peer ni: - nid: 10.10.0.10@tcp - primary nid: 10.10.0.21@tcp
Attached my proposed fix, which passes the selected output stream to yaml_lnet_peer_display() instead of hardcoding stdout.