Clear outdated log parameters when starting a new tape session
Problem
As shown in https://gitlab.cern.ch/cta/operations/-/issues/1542, the log parameters on the cta-taped
parent process are not cleared each time that it forks a new DriveHandler
subprocess.
This has two main consequences on the session monitoring:
- "Tape session finished" log messages will accumulate all the errors from previous sessions.
- New
DriveHandler
subprocesses will get their log entries polluted by parameters that do not refer to it.
As a result, the TAS is getting several false positives, putting drive down and forcing manual intervention.
We need to avoid this from happening.
Discussed solution
Extend the TapedProxy
interface with a new pure virtual function: resetLogParams()
. This function should trigger a reset of the CTA Logger parameters on both the child and parent processes.
The best place to use it is at the start of a new DataTransferSession
, since at this point we are sure that we are starting a new independent tape session.
Edit: This should trigger only the parameters that were passed from child to parent process using the WatchdogMessage
message. All the other parameters are usually set withing a scope, therefore we can guarantee that they will be deleted at the end of it.