Note: This guide covers upgrades on Ambari 2.1. You should look through the table at the top of the Ever Better Upgrades post to see which HDP upgrade guide is right for you.
Upcoming releases of OneFS will support Ambari's ability to upgrade HDP across the cluster with rolling upgrades. In the meantime, current OneFS releases require jumping through a few hoops to upgrade HDP from 2.2 to 2.3. This guide will walk you through the process.
There are three current OneFS versions affected: 7.2.0.3, 7.2.0.4, and 7.2.1.0. The upcoming release 7.2.1.1 will be similarly impacted. 7.2.0.3 and 7.2.0.4 would only allow upgrade from one release of HDP 2.2 to another maintenance release, eg 2.2.6 to 2.2.8. OneFS 7.2.1.0 introduced compatibility with Ambari 2.1.0 and HDP 2.3, which is the target of this post.
These steps walk through manual upgrade, based on the HDP upgrade guide. HDP 2.3.0 and 2.3.2 are both possibilities, but because of compatibility requirements of OneFS, Ambari 2.1 must be used. Also the steps can be applied to upgrades to maintenance releases such as 2.2.6 to 2.2.8, but they are specifically written for an upgrade from 2.2 to 2.3 and align with those HDP upgrade steps. The examples assume that postgresql is used for the Ambari database, and the steps were confirmed on Ambari Server installed on CentOS 6.6.
$ONEFSHOST - This is the host name of your OneFS cluster, as registered in Ambari Server.
$STACK - This is the 2-number stack of HDP that you are upgrading to. This is "2.3" currently.
$HDPVERSION-PACKAGE - This is the 4-number release version and 4 digit package version of HDP. The two HDP releases of 2.3 that are available today are 2.3.0.0-2557 and 2.3.2.0-2950.
$VERSIONDISPLAYNAME - This is the text that appears in bold type in Ambari Server's version page. For example, "HDP-2.3.0.0".
Because OneFS is not sending expected information to Ambari Server, in some cases no entry will be created during installation for it in the database table that tracks the state of HDP versions per host. In this sequence you will check if this is true and correct it if so.
Enter the Ambari database. From the command line of your Ambari Server machine, run the following command.
When prompted for database password input "bigdata"
Check to make sure that the OneFS host has a CURRENT entry in the host_version table.
If you don't see a CURRENT entry for OneFS, then create a new entry in the host_version table. You'll need to pick an ID that is not in use, indicated by $NEWID.
In this section you will have Ambari install packages on all of the HDP hosts, and then edit the database to reflect the state as if OneFS had provided installation results to Ambari Server.
Begin the HDP manual upgrade steps from the Hortonworks upgrade guide.
Installation in the Ambari Server version page should complete at this point, transitioning to a "Perform Upgrade" button. Do not press it.
In this section you will follow the "Preparing to Upgrade" section of the HDP upgrade guide, skipping a number of irrelevant steps for HDFS. The Ambari database will need to be updated as if OneFS has completed upgrade. The normal step to complete upgrade will not work, so that is replaced with further database edits and an ambari-server command line action.
Begin 2.3, "Preparing to Upgrade"
Skip 2.3.5 steps 2 to 8.
Resume from 2.3.5 step 9.
Do not perform 2.4.1 on OneFS, but do it on other HDP hosts.
Exit psql and start Ambari Server again.
In 2.4.4, skip steps 1 to 7.
At 8(b), perform Start instead of Restart All.
8(c) is irrelevant. Skip steps 9 to 13.
Resume and complete service upgrade tasks.
After 2.4.21 step 1, set all components to the current stack, move OneFS host and cluster state to UPGRADED.
Set the new version to CURRENT.
Your upgrade is now complete. By the time you need to upgrade HDP again, OneFS will support rolling upgrade and the process will be much easier.