From 3684d900ef5af2e35e3d0b5032897599aa2e140f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Wed, 22 Jul 2026 21:09:06 -0300 Subject: [PATCH] fix(replaycons): print full usage on missing argument, document confluent log rotation When invoked with no node name, replaycons printed a terse "Please specify a node name." Print the full usage statement instead, consistent with -h. Also document, in the man page, that confluent log rotation renames older logs and how to replay one by appending the date suffix seen in /var/log/confluent/consoles/. Recovered from the unmerged lenovobuild branch (originals 1c1b23fac, 48a92b7d4). Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com> --- .../guides/admin-guides/references/man1/replaycons.1.rst | 4 ++++ xCAT-client/pods/man1/replaycons.1.pod | 4 ++++ xCAT-server/bin/replaycons | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/source/guides/admin-guides/references/man1/replaycons.1.rst b/docs/source/guides/admin-guides/references/man1/replaycons.1.rst index 0cd788690..d8f65b8fe 100644 --- a/docs/source/guides/admin-guides/references/man1/replaycons.1.rst +++ b/docs/source/guides/admin-guides/references/man1/replaycons.1.rst @@ -36,6 +36,10 @@ the speed of the output play back. (The logs are stored in /var/log/consoles.) \ **replaycons**\ must be run locally on the system on which the console log is stored. This is normally that management node, but in a hierarchical cluster will usually be the service node. +Note that when used with confluent, log rotation will cause older logs to have a filename that replaycons +does not understand. You can have replaycons process an older log by appending the suffix seen in +/var/log/confluent/consoles/. For example, 'replaycons n1.2018-02-02' will show the log file indicated. + ******* OPTIONS diff --git a/xCAT-client/pods/man1/replaycons.1.pod b/xCAT-client/pods/man1/replaycons.1.pod index e41a5c07d..a09a69a5b 100644 --- a/xCAT-client/pods/man1/replaycons.1.pod +++ b/xCAT-client/pods/man1/replaycons.1.pod @@ -19,6 +19,10 @@ the speed of the output play back. (The logs are stored in /var/log/consoles.) B must be run locally on the system on which the console log is stored. This is normally that management node, but in a hierarchical cluster will usually be the service node. +Note that when used with confluent, log rotation will cause older logs to have a filename that replaycons +does not understand. You can have replaycons process an older log by appending the suffix seen in +/var/log/confluent/consoles/. For example, 'replaycons n1.2018-02-02' will show the log file indicated. + =head1 OPTIONS diff --git a/xCAT-server/bin/replaycons b/xCAT-server/bin/replaycons index dded022ec..b401835f2 100755 --- a/xCAT-server/bin/replaycons +++ b/xCAT-server/bin/replaycons @@ -45,7 +45,7 @@ if ($::VERSION) { } if (@ARGV < 1) { - print "Please specify a node name.\n"; + print "$usage_string\n"; exit(1); }