2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-07-31 18:19:40 +00:00

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>
This commit is contained in:
Vinícius Ferrão
2026-07-22 21:09:06 -03:00
parent cf44f51463
commit 21da014ed7
+9 -3
View File
@@ -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";