Prepare the cluster for the upgrade.
Check the requirements and the verifications needed before upgrading TDP Datacenter.
Check the minimum prerequisites to upgrade a TDP Cluster. The installed services and the technical and organizational needs of the environment may require additional prerequisites.
If needed, request help from the Support Area.
Scenarios
- 1 · Every cluster
- 2 · Large cluster
- 3 · Rolling Upgrade
Disk space, network, workloads, metadata database backup, and Auto Start disabled.
Upgrading a TDP Cluster installs new packages, which take up additional disk space, and requires communication between the Cluster machines and the package repository. Before you start, check the table below and disable the Auto Start function in Ambari.
Recommended: at least 100 GB of free disk space, either in the package repository or in the Cluster machine directories used for binaries, configuration files, and libraries. For a safe upgrade, without incidents.
Communication between the Cluster machines and the package repository must be guaranteed, over a local network or the internet. Network speed and stability directly affect the execution time and the integrity of the operation.
We recommend finishing the main workloads before the upgrade. This avoids interrupting running processes and preserves data integrity and operational continuity.
Several TDP platform components use metadata databases to store information about configurations, operations, and more. Before starting the upgrade, we recommend making a backup of the metadata databases, so you can restore them in case of failure.
Disabled in Ambari before starting the component upgrade. The steps are right below.
Before installing the new version packages, check the available disk space to avoid file corruption, operation restarts, and other problems.
"Auto Start" Function Disabled
Before starting the component upgrade, disable the Automatic Start (Auto Start) function of the services in Ambari. Follow the steps below:
Turn the switch off
Auto Start Settings set to Disabled.
Change the switch to Disabled in the Auto Start Settings option.
It worked when
Auto Start Settings option, the switch shows Disabled.Save the change
The function disabled in Ambari.
Click Save to save the change and confirm the operation.
After the upgrade is complete, the Auto Start function can be enabled again.
It worked when
Auto Start Settings set to Disabled.The two adjustments in ambari.properties: the package installation timeout and the NameNode restart time.
Your Cluster is large, with tens or hundreds of machines. In this case, some additional Apache Ambari settings may be needed for the upgrade to succeed: the package installation timeout and the NameNode restart time, both in the /etc/ambari-server/conf/ambari.properties file on the Ambari Server machine.
Parameter agent.package.install.task.timeout. Example: 3600 seconds (1 hour).
Parameter upgrade.parameter.nn-restart.timeout. Starting value: the time (in seconds) normally needed to restart the NameNode, plus 10%. Example: 660 seconds (11 minutes) if the normal time is 600 seconds (10 minutes).
Restart the Ambari Server service.
Adjusting the Package Installation Timeout
In a large Cluster, package installation by Ambari can take a long time. To avoid timeout problems, increase the value of the agent.package.install.task.timeout parameter, located in the /etc/ambari-server/conf/ambari.properties configuration file on the Ambari Server machine. Follow the steps below:
Open the Ambari Server configuration file
The ambari.properties open in the editor.
vim /etc/ambari-server/conf/ambari.properties
Adjust the property and save
The parameter with the new value.
Adjust the value of the agent.package.install.task.timeout property. Save the change and close the Ambari Server configuration file.
agent.package.install.task.timeout=3600
grep agent.package.install.task.timeout /etc/ambari-server/conf/ambari.properties
It worked when
$ grep agent.package.install.task.timeout /etc/ambari-server/conf/ambari.properties
agent.package.install.task.timeout=3600Restart the Ambari Server service
The Ambari Server reading the new value.
ambari-server restart
It worked when
$ ambari-server restart
Using python /usr/bin/python
Restarting ambari-server
Waiting for server stop...
Ambari Server stopped
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start....................
Server started listening on 8080
DB configs consistency check: no errors and warnings were found.Adjusting the NameNode Restart Time
In a large Cluster, the NameNode startup process can take a long time. The startup time depends on the available computing resources, the data volume, and the network parameters.
To prevent Ambari requests to start the NameNode from exceeding the time limit during an upgrade, configure the NameNode restart timeout parameter in Ambari, upgrade.parameter.nn-restart.timeout, in the /etc/ambari-server/conf/ambari.properties file on the Ambari Server machine.
If the upgrade.parameter.nn-restart.timeout parameter does not exist in the configuration file, add it.
Initially, add to the time (in seconds) normally needed to restart the NameNode the percentage shown in the table above. Although there is no standard method to determine an appropriate value, you can use this guideline. Follow the steps below:
Open the Ambari Server configuration file
The ambari.properties open in the editor.
vim /etc/ambari-server/conf/ambari.properties
Adjust the property and save
The parameter with the new value.
Adjust the value of the upgrade.parameter.nn-restart.timeout property. Save the change and close the Ambari Server configuration file.
upgrade.parameter.nn-restart.timeout=660
grep upgrade.parameter.nn-restart.timeout /etc/ambari-server/conf/ambari.properties
It worked when
$ grep upgrade.parameter.nn-restart.timeout /etc/ambari-server/conf/ambari.properties
upgrade.parameter.nn-restart.timeout=660Restart the Ambari Server service
The Ambari Server reading the new value.
ambari-server restart
It worked when
$ ambari-server restart
Using python /usr/bin/python
Restarting ambari-server
Waiting for server stop...
Ambari Server stopped
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start.....................
Server started listening on 8080
DB configs consistency check: no errors and warnings were found.Upgrading without interrupting the cluster requires highly available services.
You want to upgrade without interrupting the Cluster. The Rolling Upgrade upgrades a service without interrupting the Cluster. For this, the services must be configured for high availability, which ensures the continuity of operations.
Services configured for high availability.
The choice between Express Upgrade and Rolling Upgrade is made in Component upgrade.
About high availability in TDP Datacenter: High availability and resilience.