You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Bharat Viswanadham (Jira)" <ji...@apache.org> on 2021/08/23 10:32:00 UTC
[jira] [Updated] (HDDS-5655) SCM terminates when allocatecontainer
happens on closed pipeline
[ https://issues.apache.org/jira/browse/HDDS-5655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bharat Viswanadham updated HDDS-5655:
-------------------------------------
Reporter: Bharat Viswanadham (was: ITO Ryuichi)
> SCM terminates when allocatecontainer happens on closed pipeline
> ----------------------------------------------------------------
>
> Key: HDDS-5655
> URL: https://issues.apache.org/jira/browse/HDDS-5655
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Bharat Viswanadham
> Assignee: Bharat Viswanadham
> Priority: Major
>
> Scenario like this:
> 1. AllocateContainer selects open pipeline (This point it is open)
> 2. PipelineActionHandler comes and closes pipeline by calling pipelineManager#closePipeline which calls stateManager#updatePipelineState(pipelineID.getProtobuf(),
> HddsProtos.PipelineState.PIPELINE_CLOSED);
> 3. Now when containerStateManager#addContainer(containerInfo) is called, which calls pipelineManager.addContainerToPipeline(pipelineID, containerID); this will fail, as now pipeline becomes closed due to below piece of code. As containerStateManager#addContainer is replicateCall happens in StateMachine if any exception we terminate SCM.
> {code:java}
> void addContainerToPipeline(PipelineID pipelineID, ContainerID containerID)
> throws IOException {
> Preconditions.checkNotNull(pipelineID,
> "Pipeline Id cannot be null");
> Preconditions.checkNotNull(containerID,
> "Container Id cannot be null");
> Pipeline pipeline = getPipeline(pipelineID);
> if (pipeline.isClosed()) {
> throw new IOException(String
> .format("Cannot add container to pipeline=%s in closed state",
> pipelineID));
> }
> pipeline2container.get(pipelineID).add(containerID);
> }
> {code}
> *Proposed Solution:*
> Acquire pipelineManager during allocateContainer to avoid any updates to pipelineState.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org