[
https://issues.apache.org/jira/browse/HDDS-1940?focusedWorklogId=342714&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-342714
]
ASF GitHub Bot logged work on HDDS-1940:
----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Nov/19 16:37
Start Date: 13/Nov/19 16:37
Worklog Time Spent: 10m
Work Description: nandakumar131 commented on pull request #153:
HDDS-1940. Closing open container via scmcli gives false error message.
URL: https://github.com/apache/hadoop-ozone/pull/153
## What changes were proposed in this pull request?
Before this patch, to close a container the scmcli (client) was using
`notifyObjectStageChange` to inform SCM that a container is getting closed,
connects to datanode directly and closes the container and again informs SCM
that the container has been closed.
After the introduction of `IncrementalContainerReport` SCM received the
state change of a container from datanode as soon as a datanode closes it and
the container is marked as CLOSED in SCM. There is no need for a client to call
`notifyObjectStageChange` to mark the container as CLOSED.
We don't need `notifyObjectStageChange` API anymore, as SCM learns about the
state change from datanodes directly.
This change removes `notifyObjectStageChange` and adds `closeContainer` API
to `SCMClientProtocolServer`
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-1940
## How was this patch tested?
Deployed a three node cluster and manually verified close container command.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 342714)
Remaining Estimate: 0h
Time Spent: 10m
> Closing open container via scmcli gives false error message
> -----------------------------------------------------------
>
> Key: HDDS-1940
> URL: https://issues.apache.org/jira/browse/HDDS-1940
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Reporter: Attila Doroszlai
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {{scmcli close}} prints an error message about invalid state transition after
> it had successfully closed the container.
> {code:title=CLI}
> $ ozone scmcli info 2
> ...
> Container State: OPEN
> ...
> $ ozone scmcli close 2
> ...
> client-09830A377AA9->f27bf787-8711-41d4-b0fd-3ef50b5c076f: receive
> RaftClientReply:client-09830A377AA9->f27bf787-8711-41d4-b0fd-3ef50b5c076f@group-7831D6F2EF1B,
> cid=0, SUCCESS, logIndex=11,
> commits[f27bf787-8711-41d4-b0fd-3ef50b5c076f:c12,
> 37ba33fe-c9ed-4ac2-a6e5-57ce658168b4:c11,
> feb68ba4-0a8a-4eda-9915-7dc090e5f46c:c11]
> Failed to update container state #2, reason: invalid state transition from
> state: CLOSED upon event: CLOSE.
> $ ozone scmcli info 2
> ...
> Container State: CLOSED
> ...
> {code}
> {code:title=logs}
> scm_1 | 2019-08-09 15:15:01 [IPC Server handler 1 on 9860] INFO
> SCMClientProtocolServer:366 - Object type container id 1 op close new stage
> begin
> dn3_1 | 2019-08-09 15:15:02 [RatisApplyTransactionExecutor 1] INFO
> Container:356 - Container 1 is closed with bcsId 3.
> dn1_1 | 2019-08-09 15:15:02 [RatisApplyTransactionExecutor 1] INFO
> Container:356 - Container 1 is closed with bcsId 3.
> scm_1 | 2019-08-09 15:15:02
> [EventQueue-IncrementalContainerReportForIncrementalContainerReportHandler]
> INFO IncrementalContainerReportHandler:176 - Moving container #1 to CLOSED
> state, datanode feb68ba4-0a8a-4eda-9915-7dc090e5f46c{ip: 10.5.1.6, host:
> ozone-static_dn3_1.ozone-static_net, networkLocation: /default-rack,
> certSerialId: null} reported CLOSED replica.
> dn2_1 | 2019-08-09 15:15:02 [RatisApplyTransactionExecutor 1] INFO
> Container:356 - Container 1 is closed with bcsId 3.
> scm_1 | 2019-08-09 15:15:02 [IPC Server handler 3 on 9860] INFO
> SCMClientProtocolServer:366 - Object type container id 1 op close new stage
> complete
> scm_1 | 2019-08-09 15:15:02 [IPC Server handler 3 on 9860] ERROR
> ContainerStateManager:335 - Failed to update container state #1, reason:
> invalid state transition from state: CLOSED upon event: CLOSE.
> scm_1 | 2019-08-09 15:15:02 [IPC Server handler 3 on 9860] INFO Server:2726
> - IPC Server handler 3 on 9860, call Call#3 Retry#0
> org.apache.hadoop.hdds.scm.protocol.StorageContainerLocationProtocol.notifyObjectStageChange
> from 10.5.0.71:57746
> scm_1 | org.apache.hadoop.hdds.scm.exceptions.SCMException: Failed to update
> container state #1, reason: invalid state transition from state: CLOSED upon
> event: CLOSE.
> scm_1 | at
> org.apache.hadoop.hdds.scm.container.ContainerStateManager.updateContainerState(ContainerStateManager.java:336)
> scm_1 | at
> org.apache.hadoop.hdds.scm.container.SCMContainerManager.updateContainerState(SCMContainerManager.java:312)
> scm_1 | at
> org.apache.hadoop.hdds.scm.server.SCMClientProtocolServer.notifyObjectStageChange(SCMClientProtocolServer.java:379)
> scm_1 | at
> org.apache.hadoop.ozone.protocolPB.StorageContainerLocationProtocolServerSideTranslatorPB.notifyObjectStageChange(StorageContainerLocationProtocolServerSideTranslatorPB.java:219)
> scm_1 | at
> org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos$StorageContainerLocationProtocolService$2.callBlockingMethod(StorageContainerLocationProtocolProtos.java:16398)
> scm_1 | at
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:524)
> scm_1 | at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1025)
> scm_1 | at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:876)
> scm_1 | at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:822)
> scm_1 | at java.base/java.security.AccessController.doPrivileged(Native
> Method)
> scm_1 | at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
> scm_1 | at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
> scm_1 | at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2682)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]