LU-11566 utils: fix lctl llog_print for large configs
If "lctl llog_print" is called for a large configuration, it will
overflow the 8KB buffer limit for OBD ioctl commands. The kernel
snprintf calls try to overflow the supplied buffer. Avoid that.
If the configuration is large, fetch the configuration records in
chunks and print them incrementally.
Add --start and --end options to llog_print and deprecate the use of
positional parameters, since positional parameters are increasingly
complex to parse as options are added, and are harder to use.
The callback for the configuration records will allow "lctl pool_*"
commands to be processed directly on the MGS.
Move existing llog_print test_60aa, test_60ab to conf-sanity as
test_123aa and test_123ab.
Add new test_123ac and test_123ad for the new llog_print --start and
--end param, and update test_123aa to test old positional parameters.
Lustre-commit:
3783aa285b15a811081a8de829d52f7f83e91209
Lustre-change: https://review.whamcloud.com/33815
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib7d2ae893033bd4594646c980b7d0ddbd2b3a089
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33863
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>