adoroszlai opened a new pull request, #6254: URL: https://github.com/apache/ozone/pull/6254
## What changes were proposed in this pull request? `ozone admin` commands use loggers to print to standard output. They ignore logging configuration due to hard-coded info level. Log output also lack details like timestamp, thread name, etc. to mimic regular output. This change replaces `LOG.info` with printing to `System.out`, `LOG.error` with printing to `System.err`. Log messages from other parts of the code can now be displayed if needed. `LOG` messages are kept in `UpgradeManager` and `UpgradeTask` (container layout v2 to v3 upgrade tool, introduced recently), which have more complex output. I think they can benefit from using regular logging. https://issues.apache.org/jira/browse/HDDS-10405 ## How was this patch tested? Tested few commands manually in `ozone` compose environment. Tested debug level logging with `log4j.logger.org.apache.hadoop.security.SaslRpcClient=DEBUG`: ``` $ ozone admin reconfig --address datanode:19864 properties 2024-02-22 13:33:21,378 [main] DEBUG security.SaslRpcClient: Sending sasl message state: NEGOTIATE 2024-02-22 13:33:21,383 [main] DEBUG security.SaslRpcClient: Get kerberos info proto:interface org.apache.hadoop.hdds.protocolPB.ReconfigureProtocolPB info:@org.apache.hadoop.security.KerberosInfo(clientPrincipal="", serverPrincipal="hdds.scm.kerberos.principal") 2024-02-22 13:33:21,385 [main] DEBUG security.SaslRpcClient: getting serverKey: hdds.scm.kerberos.principal conf value: scm/[email protected] principal: scm/[email protected] An error occurred while executing the command for :datanode:19864 java.io.IOException: DestHost:destPort datanode:19864 , LocalHost:localPort scm/192.168.64.9:0. Failed on local exception: java.io.IOException: Couldn't set up IO streams: java.lang.IllegalArgumentException: Server has invalid Kerberos principal: dn/[email protected], expecting: scm/[email protected] ``` CI: https://github.com/adoroszlai/ozone/actions/runs/7994077722 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
