hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-1527) HDDS Datanode start fails due to datanode.id file read errors
Date Thu, 16 May 2019 04:03:00 GMT

     [ https://issues.apache.org/jira/browse/HDDS-1527?focusedWorklogId=243105&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-243105

ASF GitHub Bot logged work on HDDS-1527:

                Author: ASF GitHub Bot
            Created on: 16/May/19 04:02
            Start Date: 16/May/19 04:02
    Worklog Time Spent: 10m 
      Work Description: xiaoyuyao commented on pull request #822: HDDS-1527. HDDS Datanode
start fails due to datanode.id file read error
URL: https://github.com/apache/hadoop/pull/822#discussion_r284531715

 File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java
 @@ -221,8 +226,16 @@ public synchronized static DatanodeDetails readDatanodeDetailsFrom(File
     try {
       return DatanodeIdYaml.readDatanodeIdFile(path);
     } catch (IOException e) {
-      throw new IOException("Failed to parse DatanodeDetails from "
-          + path.getAbsolutePath(), e);
+      LOG.warn("Error loading DatanodeDetails yaml from " +
+          path.getAbsolutePath(), e);
+      // Try to load as protobuf before giving up
+      try (FileInputStream in = new FileInputStream(path)) {
 Review comment:
   @swagle , change looks good to me. Can you add a unit test to valid the upgrade case where
the old protobuf is successfully read and rewrite into yaml format. 
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:

Issue Time Tracking

    Worklog Id:     (was: 243105)
    Time Spent: 40m  (was: 0.5h)

> HDDS Datanode start fails due to datanode.id file read errors
> -------------------------------------------------------------
>                 Key: HDDS-1527
>                 URL: https://issues.apache.org/jira/browse/HDDS-1527
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Datanode
>    Affects Versions: 0.5.0
>            Reporter: Aravindan Vijayan
>            Assignee: Siddharth Wagle
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.5.0
>          Time Spent: 40m
>  Remaining Estimate: 0h
> * Ozone datanode start fails when there is an existing Datanode.id file which is non
yaml format. (Yaml format was added through HDDS-1473.).
> * Further, when 'ozone.scm.datanode.id' is not configured, the datanode.id file is created
in a different directory than the fallback dir (ozone.metadata.dirs). Restart fails since
it looks for the datanode.id in ozone.metadata.dirs. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message