Rollback Ambari to 2.6.5
You must use the backup of Ambari 2.6.x to perform the following steps.
- Stop all services in Ambari UI.
-
On the Ambari Server host, stop the Ambari Server.
ambari-server stop Stop Ambari Agent on all host ambari-agent stop
-
Obtain Ambari Repositories:
wget -nv https://archive.cloudera.com/p/ambari/2.x/${your_ambari_version}/centos7/ambari.repo -O /etc/yum.repos.d/ambari.repo yum clean all
-
Downgrade ambari-server, ambari-agent packages manually using
“yum downgrade <packagename>”
yum downgrade ambari-server yum downgrade ambari-agent # on all hosts
-
Reinitialize Ambari DB - Drop the old schema and initialize blank new schema
:
Example - Postgres
psql -W -d ${AMBARI_DB_NAME} --user ${AMBARI_DB_USER} DROP SCHEMA ${AMBARI_DB_NAME} CASCADE; CREATE SCHEMA ambari; GRANT ALL ON SCHEMA ambari TO ambari;
MYSQLmysql -u ${AMBARI_DB_USER} drop database ${AMBARI_DB_NAME}; create database ${AMBARI_DB_NAME};
-
Populate the Ambari database with backup data:
POSTGRES
psql -W -d ${AMBARI_DB_NAME} --user ${AMBARI_DB_USER} < pre_upgrade.sql
MYSQLmysql -u ${AMBARI_DB_USER} ${AMBARI_DB_NAME} < pre_upgrade.sql
-
Clear views cache (it has views for 7.1 cached, some of which are not
supported):
rm -f /var/lib/ambari-server/resources/views/work/*
-
Restore these files from the backup:
/etc/ambari-server/conf/ambari.properties /etc/ambari-agent/conf/ambari-agent.ini
-
Restore old stack symlinks on Agent nodes:
hdp-select set all 2.6.5.0-292
-
Check ambari-server user:
If ambari-server is running as non-root user, set permissions for files by running:grep ambari-server.user /etc/ambari-server/conf/ambari.properties
ambari-server setup
- Start Ambari