-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-2534. scmcli container delete not working #389
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
Conversation
|
@xiaoyuyao please review. relates to #214 |
| Set<ContainerReplica> replicas = | ||
| containerStateManager.getContainerReplicas(containerID); | ||
| for(ContainerReplica replica : replicas){ | ||
| nodeManager.removeContainers(replica.getDatanodeDetails(), Stream.of( |
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.
Can we create the set of containerID outside the loop with a simpler Java APIs:
Set containerIdSet = Collections.singleton(containerID);
replias.forEach(replica->nodeManager.removeContainers(replica.getDatanodeDetails(), containerIdSet));
...-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/SCMContainerManager.java
Outdated
Show resolved
Hide resolved
| " {} from datanode {},delete it.", | ||
| replicaProto.getContainerID(), | ||
| datanodeDetails); | ||
| publisher.fireEvent( |
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.
Should we fireEvent upon receive the scmcli request? Can we add some high level design description wrt the flow of the delete in the PR description? That will help the reviewers.
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.
+1 for @xiaoyuyao's description request. The delete container flow is quite important for Recon to work correctly and hence trying to understand this better. Will there be a case where a user will need to delete a container directly using SCM?
| @Override | ||
| public void removeContainers(DatanodeDetails datanodeDetails, | ||
| Set<ContainerID> containerIds) throws NodeNotFoundException { | ||
| nodeStateManager.removeContainers(datanodeDetails.getUuid(), containerIds); |
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.
Do we need to remove the container from the pipelineContainerMap in SCMPipelineManager?
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.
Before delete a container, we should close it; When we close a container , The function SCMContainerManager#updateContainerState will remove the container from pipelineContainerMap in SCMPipelineManager.
xiaoyuyao
left a comment
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.
Thanks @chimney-lee for working on this. I have some questions commented inline.
Add datanode info in Exception message
|
/pending Questions/suggestions from @xiaoyuyao are not yet addressed in the last commit. |
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.
Marking this issue as un-mergeable as requested.
Please use /ready comment when it's resolved.
Questions/suggestions from @xiaoyuyao are not yet addressed in the last commit.
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.
Marking this issue as un-mergeable as requested.
Please use /ready comment when it's resolved.
Questions/suggestions from @xiaoyuyao are not yet addressed in the last commit.
|
@chimney-lee Thank you for working on this, do you still working on? |
|
|
@maobaolong Sorry for this , it has been a long time, glad if someone could contine this work |
|
@chimney-lee Thank you for the past working on this, i will continue this work. |
|
Thanks @chimney-lee for the work on this so far, and @maobaolong for taking it up. I assume @maobaolong will open a new PR for the updated change, so closing this. |
What changes were proposed in this pull request?
What changes were proposed in this pull request?
fix scmcli container delete not working
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-2534
#214
How was this patch tested?
exec bin/ozone scmcli container delete