ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-10559. Add a warning or a check to run repair tool as System user

Open DaveTeng0 opened this issue 10 months ago • 2 comments

What changes were proposed in this pull request?

We added a repair tool for snapshot chain fix as part of PR: https://github.com/apache/ozone/pull/6386

This check was missed in the original PR. This task is to add a check or warning to make sure that the repair tool is run as system user (default to hdfs)

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10559

How was this patch tested?

Unit test

DaveTeng0 avatar Apr 22 '24 17:04 DaveTeng0

cc. @hemantk-12 @errose28

DaveTeng0 avatar Apr 22 '24 17:04 DaveTeng0

Thanks for adding this @DaveTeng0. The repair command could have uses on all nodes, not just OM. I think it is also difficult to figure out which user is usually being used to run each process from this command. I'm thinking that instead of trying to check the value against a "correct" value that's hard to determine, we can just print a message to stderr every time like:

Running as user <user>. Make sure this is the same user used to run the Ozone process.

The repair command will be infrequently used, so I think printing messages like this every time are ok. If someone knows a reliable way to get the user that runs each process though let me know and we can use that instead.

Yeah it makes sense! updated command message accordingly! Thanks @errose28 !

DaveTeng0 avatar Apr 30 '24 00:04 DaveTeng0

Hello! If no further new comments, please feel free to merge! Thanks!

DaveTeng0 avatar May 14 '24 18:05 DaveTeng0

Thanks, @DaveTeng0 for the change and @errose28 for the review.

hemantk-12 avatar May 15 '24 20:05 hemantk-12