From fe1f4c64d130235f846988476d82c7bdd7ed0ade Mon Sep 17 00:00:00 2001
From: Jing Zhao
- Note that downgrade and rollback are possible only after a rolling upgrade is started and + Note that downgrade can be done in a rolling fashion but rollback cannot. + Rollback requires cluster downtime. +
++ Note also that downgrade and rollback are possible only after a rolling upgrade is started and before the upgrade is terminated. An upgrade can be terminated by either finalize, downgrade or rollback. Therefore, it may not be possible to perform rollback after finalize or downgrade, or to perform downgrade after finalize.
+ -Downgrade restores the software back to the pre-upgrade release and preserves the user data. @@ -174,21 +178,70 @@ A newer release is downgradable to the pre-upgrade release only if both the namenode layout version and the datenode layout version are not changed between these two releases. - Below are the steps for downgrade:
-+ In a HA cluster, + when a rolling upgrade from an old software release to a new software release is in progress, + it is possible to downgrade, in a rolling fashion, the upgraded machines back to the old software release. + Same as before, suppose NN1 and NN2 are respectively in active and standby states. + Below are the steps for rolling downgrade: +
+hdfs dfsadmin -shutdownDatanode <DATANODE_HOST:IPC_PORT> upgrade
"
+ to shutdown one of the chosen datanodes.hdfs dfsadmin -getDatanodeInfo <DATANODE_HOST:IPC_PORT>
"
+ to check and wait for the datanode to shutdown.-rollingUpgrade downgrade
"
+ option here.)
+ -rollingUpgrade downgrade
"
+ option here.)
+ hdfs dfsadmin -rollingUpgrade finalize
"
+ to finalize the rolling downgrade.+ Note that the datanodes must be downgraded before downgrading the namenodes + since protocols may be changed in a backward compatible manner but not forward compatible, + i.e. old datanodes can talk to the new namenodes but not vice versa. +
++ Administrator may choose to first shutdown the cluster and then downgrade it. + The following are the steps: +
+-rollingUpgrade downgrade
" option.Rollback restores the software back to the pre-upgrade release but also reverts the user data back to the pre-upgrade state. @@ -198,6 +251,7 @@
Rollback from a newer release to the pre-upgrade release is always supported. + However, it cannot be done in a rolling fashion. It requires cluster downtime. Below are the steps for rollback:
Note that the command does not wait for the datanode shutdown to complete. The "dfsadmin -getDatanodeInfo" - command can be used for checking if the datanode shutdown is complete. + command can be used for checking if the datanode shutdown is completed.