From 21da014ed762e0a27c8b5a5fa63384b5540d8554 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): detect confluent by console service, not binary presence replaycons chose the confluent console log directory (/var/log/confluent/consoles) whenever the confetty binary happened to be present. On a host that has confluent installed but runs conserver as the active console service, that directory is empty and replaycons could not find the log. Gate on the site table's consoleservice attribute instead -- the same setting rcons uses -- so replaycons reads /var/log/confluent/consoles only when confluent is actually the configured console service. Recovered from the unmerged lenovobuild branch (originals 3ce4d81b3, 57f6ddd38). Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com> --- xCAT-server/bin/replaycons | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/xCAT-server/bin/replaycons b/xCAT-server/bin/replaycons index dded022ec..29c64e688 100755 --- a/xCAT-server/bin/replaycons +++ b/xCAT-server/bin/replaycons @@ -71,9 +71,15 @@ if ($hmtab) { } my $file = "/var/log/consoles/$node"; -#use confluent if it is there -if ((-x "/opt/confluent/bin/confetty") || (-x "/usr/bin/confetty")) { - $file = "/var/log/confluent/consoles/$node"; +#use confluent only when it is the configured console service, not merely +#installed -- otherwise a host with confluent present but conserver active +#would look in the wrong (empty) log directory +my $stab = xCAT::Table->new('site'); +if ($stab) { + (my $ref) = $stab->getAttribs({ key => 'consoleservice' }, 'value'); + if ($ref->{value} && $ref->{value} eq 'confluent') { + $file = "/var/log/confluent/consoles/$node"; + } } #print "file=$file\n";