You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Ethan Rose (Jira)" <ji...@apache.org> on 2021/10/20 20:41:06 UTC

[jira] [Updated] (HDDS-2694) HddsVolume#readVersionFile fails when reading older versions

     [ https://issues.apache.org/jira/browse/HDDS-2694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ethan Rose updated HDDS-2694:
-----------------------------
    Target Version/s: 1.3.0  (was: 1.2.0)

I am managing the 1.2.0 release and we currently have more than 600 issues targeted for 1.2.0. I am moving the target field to 1.3.0.

If you are actively working on this jira and believe this should be targeted for the 1.2.0 release, Please reach out to me via Apache email or Slack.

> HddsVolume#readVersionFile fails when reading older versions
> ------------------------------------------------------------
>
>                 Key: HDDS-2694
>                 URL: https://issues.apache.org/jira/browse/HDDS-2694
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: Ozone Datanode
>            Reporter: Attila Doroszlai
>            Assignee: Aravindan Vijayan
>            Priority: Critical
>              Labels: Triaged, upgrade
>
> {{HddsVolume#layoutVersion}} is a version number, supposed to be used for handling upgrades from older versions.  Currently only one version is defined.  But should a new version be introduced, HddsVolume would fail to read older version file.  This is caused by a check in {{HddsVolumeUtil}} that only considers the latest version as valid:
> {code:title=https://github.com/apache/hadoop-ozone/blob/1d56bc244995e857b842f62d3d1e544ee100bbc1/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/utils/HddsVolumeUtil.java#L137-L153}
>   /**
>    * Returns layOutVersion if it is valid. Throws an exception otherwise.
>    */
>   @VisibleForTesting
>   public static int getLayOutVersion(Properties props, File versionFile) throws
>       InconsistentStorageStateException {
>     String lvStr = getProperty(props, OzoneConsts.LAYOUTVERSION, versionFile);
>     int lv = Integer.parseInt(lvStr);
>     if(DataNodeLayoutVersion.getLatestVersion().getVersion() != lv) {
>       throw new InconsistentStorageStateException("Invalid layOutVersion. " +
>           "Version file has layOutVersion as " + lv + " and latest Datanode " +
>           "layOutVersion is " +
>           DataNodeLayoutVersion.getLatestVersion().getVersion());
>     }
>     return lv;
>   }
> {code}
> I think this should check whether the version number identifies a known {{DataNodeLayoutVersion}}.



--
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