Skip to content

Commit

Permalink
Merge pull request #18682 from jakesmith/HPCC-31892-remove-containeri…
Browse files Browse the repository at this point in the history
…zed-audit-redirection

HPCC-31892 Remove containerized audit redirection

Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored May 23, 2024
2 parents 82758ff + fac95bb commit ce44d17
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions dali/base/daclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ void CSDSServerStatus::stop()

void connectLogMsgManagerToDali()
{
if (isContainerized())
return; // we do not redirect logging between components in containerized environments (this is used for audit->dali in BM)
IGroup & servers = queryCoven().queryGroup();
unsigned parentRank = getRandom() % servers.ordinality(); // PG: Not sure if logging to random parent is best?
daliClientLoggingParent = &servers.queryNode(parentRank);
Expand Down
7 changes: 4 additions & 3 deletions dali/server/daserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ void AddServers(const char *auditdir)
servers.append(*createDaliSDSServer(serverConfig));
servers.append(*createDaliNamedQueueServer());
servers.append(*createDaliDFSServer(serverConfig));
servers.append(*createDaliAuditServer(auditdir));
if (!isContainerized()) // NB: audit logging is output locally by the container in containerized mode (and picked up by a logging backend)
servers.append(*createDaliAuditServer(auditdir));
servers.append(*createDaliDiagnosticsServer());
// add new coven servers here
}
Expand Down Expand Up @@ -699,10 +700,10 @@ int main(int argc, const char* argv[])
group->Release();
epa.kill();

// Audit logging
StringBuffer auditDir;
if (!isContainerized()) // NB: audit logging is output locally by the container in containerized mode (and picked up by a logging backend)
{
//MORE: Does this need to change in CONTAINERIZED mode?
// Audit logging
Owned<IComponentLogFileCreator> lf = createComponentLogFileCreator(serverConfig, "dali");
lf->setLogDirSubdir("audit");//add to tail of config log dir
lf->setName("DaAudit");//override default filename
Expand Down
2 changes: 2 additions & 0 deletions system/mp/mplog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,8 @@ bool disconnectLogMsgManagerFromParentOwn(INode * parentNode)

void startLogMsgParentReceiver()
{
if (isContainerized())
return; // we do not redirect logging between components in containerized environments (this is used for audit->dali in BM)
parentReceiver = new LogMsgParentReceiverThread();
parentReceiver->start(false);
}
Expand Down

0 comments on commit ce44d17

Please sign in to comment.