Sadanand Shenoy created HDDS-8949:
-------------------------------------

             Summary: Datanodes fail to start up after downgrade.
                 Key: HDDS-8949
                 URL: https://issues.apache.org/jira/browse/HDDS-8949
             Project: Apache Ozone
          Issue Type: Bug
            Reporter: Sadanand Shenoy


Trying to perform an Ozone downgrade from a version supporting HTTP ports in 
datanode.
{code:java}
ERRORHddsDatanodeServiceException in HddsDatanodeService.
java.lang.IllegalArgumentException: No enum constant 
org.apache.hadoop.hdds.protocol.DatanodeDetails.Port.Name.HTTP
        at java.lang.Enum.valueOf(Enum.java:238)
        at 
org.apache.hadoop.hdds.protocol.DatanodeDetails$Port$Name.valueOf(DatanodeDetails.java:776)
        at 
org.apache.hadoop.ozone.container.common.helpers.DatanodeIdYaml.readDatanodeIdFile(DatanodeIdYaml.java:99)
        at 
org.apache.hadoop.ozone.container.common.helpers.ContainerUtils.readDatanodeDetailsFrom(ContainerUtils.java:171)
        at 
org.apache.hadoop.ozone.HddsDatanodeService.initializeDatanodeDetails(HddsDatanodeService.java:446)
        at 
org.apache.hadoop.ozone.HddsDatanodeService.start(HddsDatanodeService.java:204)
        at 
org.apache.hadoop.ozone.HddsDatanodeService.start(HddsDatanodeService.java:190)
        at 
org.apache.hadoop.ozone.HddsDatanodeService.call(HddsDatanodeService.java:165)
        at 
org.apache.hadoop.ozone.HddsDatanodeService.call(HddsDatanodeService.java:83)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1933)
        at picocli.CommandLine.access$1100(CommandLine.java:145)
        at 
picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2332)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2326)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2291)
        at 
picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:2152)
        at picocli.CommandLine.parseWithHandlers(CommandLine.java:2530)
        at picocli.CommandLine.parseWithHandler(CommandLine.java:2465)
        at org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:96)
        at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:87)
        at 
org.apache.hadoop.ozone.HddsDatanodeService.main(HddsDatanodeService.java:148) 
{code}
I see this 
[comment|https://github.com/apache/ozone/pull/4278#issuecomment-1439184020] 
which refers to the same issue, Following the conversion on the PR, it seems 
like HDDS-8239 should have fixed the issue after introducing layout version for 
each new addition of port in the DatanodeDetails.
However IIUC, if the the current layout version is greater than or equal to the 
layout version of the annotation , then it will write it to the file. But it 
still doesn't handle the read case of this file from an older version.
Sequence
1. Datanode inits in the new version that supports HTTP port and it writes to 
the file.
2. Downgrade to a version not containing the HTTP port.
3. The file still has this value and while DN starts up and fails to read which 
is what the stacktrace points.
It looks like some cleanup steps are required by adding an upgrade handler here.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to