-
Notifications
You must be signed in to change notification settings - Fork 509
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-10231. ContainerStateManager should not finalize the OPEN containers without a Pipeline. #6123
Conversation
…ners without a Pipeline.
...t/java/org/apache/hadoop/hdds/scm/container/replication/health/TestOpenContainerHandler.java
Show resolved
Hide resolved
...t/java/org/apache/hadoop/hdds/scm/container/replication/health/TestOpenContainerHandler.java
Show resolved
Hide resolved
Looks mostly good. I just have a suggestion to add another check in a couple of the tests. |
Thanks for the review @sodonnel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @nandakumar131 Thanks for the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @nandakumar131 for the patch, @siddhantsangwan, @sodonnel for the review. |
@nandakumar131 Warn logs needs to be updated as telling it "marking container for closing", but this logic is moved now to Replication manager |
@sumitagrawl, thanks for the review. I will update the log in one of my following PRs. |
… without a Pipeline. (apache#6123) (cherry picked from commit 04d6e0b)
… without a Pipeline. (apache#6123) (cherry picked from commit 04d6e0b)
… without a Pipeline. (apache#6123) (cherry picked from commit 04d6e0b)
…N containers without a Pipeline. (apache#6123) (cherry picked from commit 04d6e0b) Change-Id: If6fa9aa4447c7664e0a4f9794244af4711fc2ca6
What changes were proposed in this pull request?
If there is an OPEN container without any pipeline, that container has to be moved to CLOSING state and CLOSE container command has to be sent to the datanodes.
Currently, this is done while SCM is initialized. Since Ratis is not set up completely (mostly no leader is elected at this point), the state update is done locally (not via Ratis).
Doing this on SCM start-up is error-prone.
The container state update has to be done only via Ratis. If not, there are chances of container state getting diverged between SCMs.
This PR changes the logic and moves it to ReplicationManager's
OpenContainerHandler
, where we check if the OPEN Container has a healthy Pipeline, if not the container is closed.What is the link to the Apache JIRA
HDDS-10231
How was this patch tested?
Added new unit test to cover the scenario.