[ https://issues.apache.org/jira/browse/HDDS-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16542266#comment-16542266 ]
Hanisha Koneru commented on HDDS-249: ------------------------------------- Thanks for working on this, [~bharatviswa]. * I think this work is dependent on HDDS-241. Lets say we have a situation where a volume has an scmDir but the VERSION file is missing. And during formatting, we fail to create the Version file. The following check in HddsVolumeUtil assumes that the file inside hdds dir is the VERSION file whereas, in this situation, it is an scmDir. We will end up creating two scmDirs with no Version File and return the volume as healthy. {code:java} File[] hddsFiles = hddsVolume.getHddsRootDir().listFiles(); if (hddsFiles !=null && hddsFiles.length == 1) { // DN started for first time or this is a newly added volume. // So we create scm directory. So only version file should be available. if (!scmDir.mkdir()) { logger.error("Unable to create scmDir {}", scmDir); } result = true; } else if (!scmDir.exists()) { // Already existing volume, and this is not first time dn is started logger.error("Volume {} is in Inconsistent state, missing scm {} " + "directory", volumeRoot, scmId); } else { result = true; } {code} Once we HDDS-241 goes in, we can detect an inconsistent volume and this situation can be avoided. * We will also need to verify that the scmId matches the name of the scmDir inside hddsVolume dir. * NIT : Unrelated to this change, VersionEndPointTask, line#80 - null check is for clusterId. Could you please fix that also along with this change. > Fail if multiple SCM IDs on the DataNode and add SCM ID check after version > request > ----------------------------------------------------------------------------------- > > Key: HDDS-249 > URL: https://issues.apache.org/jira/browse/HDDS-249 > Project: Hadoop Distributed Data Store > Issue Type: Improvement > Reporter: Bharat Viswanadham > Assignee: Bharat Viswanadham > Priority: Major > Fix For: 0.2.1 > > Attachments: HDDS-249.00.patch, HDDS-249.01.patch, HDDS-249.02.patch > > > This Jira take care of following conditions: > # If multiple Scm directories exist on datanode, it fails that volume. > # validate SCMID response from SCM. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org