hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinayakumar B (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HDFS-9096) Issue in Rollback (after rolling upgrade) from hadoop 2.7.1 to 2.4.0
Date Tue, 18 Oct 2016 15:02:58 GMT

    [ https://issues.apache.org/jira/browse/HDFS-9096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15585675#comment-15585675
] 

Vinayakumar B edited comment on HDFS-9096 at 10/18/16 3:02 PM:
---------------------------------------------------------------

I think this was fixed automatically by HDFS-7185. which is present in 2.6.0

After the rollingUpgrade to version with layoutVersion change, upgraded VERSION file will
contain new version.
Without HDFS-7185, setting of layout version will fail as VERSION file contains new layout
version.

After HDFS-7185, while loading the rollback image, "layoutVersion" will be ignored from VERSION
file and set same as Software's VERSION, but it will be checked strictly from image file.

Following changes in NNStorage.java will do the this.
{code}  void readProperties(StorageDirectory sd, StartupOption startupOption)
      throws IOException {
    Properties props = readPropertiesFile(sd.getVersionFile());
    if (HdfsServerConstants.RollingUpgradeStartupOption.ROLLBACK.matches
        (startupOption)) {
      int lv = Integer.parseInt(getProperty(props, sd, "layoutVersion"));
      if (lv > getServiceLayoutVersion()) {
        // we should not use a newer version for rollingUpgrade rollback
        throw new IncorrectVersionException(getServiceLayoutVersion(), lv,
            "storage directory " + sd.getRoot().getAbsolutePath());
      }
      props.setProperty("layoutVersion",
          Integer.toString(HdfsServerConstants.NAMENODE_LAYOUT_VERSION));
    }
    setFieldsFromProperties(props, sd);
  }{code}


But in 2.8.0 in HDFS-8432, updating the VERSION file on rolling upgrade is avoided.


was (Author: vinayrpet):
I think this was fixed automatically by HDFS-7185. which is present in 2.6.0

After the rollingUpgrade to version with layoutVersion change, upgraded VERSION file will
contain new version.
Without HDFS-7185, setting of layout version will fail as VERSION file contains new layout
version.

After HDFS-7185, while loading the rollback image, "layoutVersion" will be ignored from VERSION
file and set same as Software's VERSION, but it will be checked strictly from image file.

> Issue in Rollback (after rolling upgrade) from hadoop 2.7.1 to 2.4.0
> --------------------------------------------------------------------
>
>                 Key: HDFS-9096
>                 URL: https://issues.apache.org/jira/browse/HDFS-9096
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: rolling upgrades
>    Affects Versions: 2.4.0
>            Reporter: Harpreet Kaur
>
> I tried to do rolling upgrade from hadoop 2.4.0 to hadoop 2.7.1. As per http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsRollingUpgrade.html#dfsadmin_-rollingUpgrade
one can rollback to previous release provided the finalise step is not done. I upgraded the
setup but didnot finalise the upgrade and tried to rollback HDFS to 2.4.0
> I tried the following steps
>   1.  Shutdown all NNs and DNs.
>   2.  Restore the pre-upgrade release in all machines.
>   3.  Start NN1 as Active with the "-rollingUpgrade rollback<http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsRollingUpgrade.html#namenode_-rollingUpgrade>"
option.
> I am getting the following error after 3rd step
> 15/09/01 17:53:35 INFO namenode.AclConfigFlag: ACLs enabled? false
> 15/09/01 17:53:35 INFO common.Storage: Lock on <<NameNode dir>>/in_use.lock
acquired by nodename 12152@VM-2
> 15/09/01 17:53:35 WARN namenode.FSNamesystem: Encountered exception loading fsimage
> org.apache.hadoop.hdfs.server.common.IncorrectVersionException: Unexpected version of
storage directory /data/yarn/namenode. Reported: -63. Expecting = -56.
> at org.apache.hadoop.hdfs.server.common.StorageInfo.setLayoutVersion(StorageInfo.java:178)
> at org.apache.hadoop.hdfs.server.common.StorageInfo.setFieldsFromProperties(StorageInfo.java:131)
> at org.apache.hadoop.hdfs.server.namenode.NNStorage.setFieldsFromProperties(NNStorage.java:608)
> at org.apache.hadoop.hdfs.server.common.StorageInfo.readProperties(StorageInfo.java:228)
> at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverStorageDirs(FSImage.java:309)
> at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:202)
> at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:882)
> at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:639)
> at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:455)
> at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:511)
> at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:670)
> at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:655)
> at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1304)
> at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1370)
> 15/09/01 17:53:35 INFO mortbay.log: Stopped SelectChannelConnector@0.0.0.0:50070
> 15/09/01 17:53:35 INFO impl.MetricsSystemImpl: Stopping NameNode metrics system...
> 15/09/01 17:53:35 INFO impl.MetricsSystemImpl: NameNode metrics system stopped.
> 15/09/01 17:53:35 INFO impl.MetricsSystemImpl: NameNode metrics system shutdown complete.
> 15/09/01 17:53:35 FATAL namenode.NameNode: Exception in namenode join
> From rolling upgrade documentation it can be inferred that rolling upgrade is supported
Hadoop 2.4.0 onwards but rollingUpgrade rollback to Hadoop 2.4.0 seems to be broken in Hadoop
2.4.0. It throws above mentioned error.
> Are there any other steps to perform rollback (from rolling upgrade) or is it not supported
to rollback to Hadoop 2.4.0.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message