Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
May 15, 2024

Conversation

DaveTeng0
Copy link
Contributor

What changes were proposed in this pull request?

We added a repair tool for snapshot chain fix as part of PR: #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
Copy link
Contributor Author

cc. @hemantk-12 @errose28

Copy link
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@DaveTeng0
Copy link
Contributor Author

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 !

Copy link
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating @DaveTeng0

@DaveTeng0
Copy link
Contributor Author

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

Copy link
Contributor

@hemantk-12 hemantk-12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @DaveTeng0 for the change.

Overall looks good to me.

@hemantk-12 hemantk-12 merged commit 99acf10 into apache:master May 15, 2024
39 checks passed
@hemantk-12
Copy link
Contributor

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

errose28 added a commit to errose28/ozone that referenced this pull request May 28, 2024
…concile-cli

* HDDS-10239-container-reconciliation: (296 commits)
  HDDS-10897. Refactor OzoneQuota (apache#6714)
  HDDS-10422. Fix some warnings about exposing internal representation in hdds-common (apache#6351)
  HDDS-10899. Refactor Lease callbacks (apache#6715)
  HDDS-10890. Increase default value for hdds.container.ratis.log.appender.queue.num-elements (apache#6711)
  HDDS-10832. Client should switch to streaming based on OpenKeySession replication (apache#6683)
  HDDS-10435. Support S3 object tags for existing requests (apache#6607)
  HDDS-10883. Improve logging in Recon for finalising DN logic. (apache#6704)
  HDDS-8752. Enable TestOzoneRpcClientAbstract#testOverWriteKeyWithAndWithOutVersioning (apache#6702)
  HDDS-10875. XceiverRatisServer#getRaftPeersInPipeline should be called before XceiverRatisServer#removeGroup (apache#6696)
  HDDS-10514. Recon - Provide DN decommissioning detailed status and info inline with current CLI command output. (apache#6376)
  HDDS-10878. Bump zstd-jni to 1.5.6-3 (apache#6701)
  HDDS-10877. Bump Dropwizard metrics to 3.2.6 (apache#6699)
  HDDS-10876. Bump jackson to 2.16.2 (apache#6697)
  HDDS-6116. Remove flaky tag from TestSCMInstallSnapshot (apache#6695)
  HDDS-2643. TestOzoneDelegationTokenSecretManager#testRenewTokenFailureRenewalTime fails intermittently.
  HDDS-10699. Refactor ContainerBalancerTask and TestContainerBalancerTask (apache#6537)
  HDDS-10861. Ozone cli supports default ozone.om.service.id (apache#6680)
  HDDS-10859. Improve error messages when decommission and maintenance fail-early (apache#6678)
  HDDS-9031. Upgrade acceptance tests to Docker Compose v2 (apache#6667)
  HDDS-10559. Add a warning or a check to run repair tool as System user (apache#6574)
  ...

Conflicts:
    hadoop-ozone/dist/src/main/smoketest/admincli/container.robot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants