'cta-admin' user errors should be logged as INFO
Problem
As shown in https://gitlab.cern.ch/cta/operations/-/issues/1259, cta-admin
user errors are logged internally with the level ERROR
, sometimes with a backtrace.
Since there errors were simply caused by an user inserting the cta-admin
arguments wrongly, they do not represent an actual error on the CTA server/frontend side. It's simply a misuse by the user, which should only be reported as an error to him. There is also no point in logging a backtrace.
Example:
- Typing
cta-admin tape ls --state REPACK_PRNDING
causes the following ERROR to be logged:
[1700930735.676620000] Nov 25 17:45:35.676620 ctaproductionfrontend02.cern.ch cta-frontend: LVL="ERROR" PID="14192" TID="14306" MSG="In RequestProc::ExecuteAction(): RSP_ERR_CTA: The state given (REPACKING_PRNDING) does not exist. Possible values are ACTIVE BROKEN DISABLED EXPORTED REPACKING REPACKING_DISABLED#012/lib64/libctacommon.so.0(cta::exception::Backtrace::Backtrace(bool)+0x6b)
[0x7fb9b516751f]#012/lib64/libctacommon.so.0(cta::exception::Exception::Exception(std::string const&, bool)+0x84)
[0x7fb9b5168ac8]#012/lib64/libctacommon.so.0(cta::common::dataStructures::Tape::stringToState(std::string const&, bool)+0x13b)
[0x7fb9b5154b71]#012/lib64/libXrdSsiCta.so(cta::xrd::TapeLsStream::TapeLsStream(cta::frontend::AdminCmdStream const&, cta::catalogue::Catalogue&, cta::Scheduler&)+0x44a)
[0x7fb9b7e8ba0a]#012/lib64/libXrdSsiCta.so(cta::frontend::AdminCmdStream::processTape_Ls(cta::xrd::Response&)+0x54)
[0x7fb9b7e8f08e]#012/lib64/libXrdSsiCta.so(cta::frontend::AdminCmdStream::process()+0x40b)
[0x7fb9b7e8d817]#012/lib64/libXrdSsiCta.so(cta::xrd::RequestMessage::process(cta::xrd::Request const&, cta::xrd::Response&, XrdSsiStream*&)+0xf2) [0x7fb9b7e81a5c]#012/lib64/libXrdSsiCta.so(XrdSsiPb::RequestProc<cta::xrd::Request, cta::xrd::Response, cta::xrd::Alert>::ExecuteAction()+0x157) [0x7fb9b7e7f8ed]#012/lib64/libXrdSsiCta.so(XrdSsiPb::RequestProc<cta::xrd::Request, cta::xrd::Response, cta::xrd::Alert>::Execute()+0xd0) [0x7fb9b7e7ccd6]#012/lib64/libXrdSsiCta.so(XrdSsiPb::Service<cta::xrd::Request, cta::xrd::Response, cta::xrd::Alert>::ProcessRequest(XrdSsiRequest&, XrdSsiResource&)+0x8f) [0x7fb9b7e7bbad]#012/lib64/libXrdUtils.so.2(XrdScheduler::Run()+0x17f)
[0x7fb9d0d1323f]#012/lib64/libXrdUtils.so.2(XrdStartWorking(void*)+0x9) [0x7fb9d0d13389]#012/lib64/libXrdUtils.so.2(XrdSysThread_Xeq+0x37)
[0x7fb9d0cd8be7]#012/lib64/libpthread.so.0(+0x7ea5) [0x7fb9d088cea5]#012/lib64/libc.so.6(clone+0x6d)
[0x7fb9cfb8db0d]#012"
Solution
- User errors triggered by incorrect
cta-admin
commands should be logged withINFO
level. - Do not log a backtrace.