This section helps you to rollback automatically using the below procedure. Cloudera
recommends you to use this procedure on the test clusters before performing the procedure on
the production clusters.
-
Go to the am2cm-ansible folder:
-
If you have used Docker to upgrade, create a bash session inside the
container and go to the am2cm-ansible folder:
docker container exec -it <container_id>
/bin/bashcd am2cm-ansible/
-
If you have used local installation to upgrade, activate the python
virtual environment and go to the am2cm-ansible
folder: source <path/to/am2cm-2.x.y.0-bb>/venv/bin/activate
cd <path/to/am2cm-2.x.y.0-bb>/am2cm-ansible/
-
Execute the rollback playbooks: Running the rollback playbooks require you to
specify an inventory and extra-vars file. You can review the previous upgrade
steps to identify the files specific to your environment.
-
Rollback Cloudera Manager to Ambari and restore
/etc configuration directories
ansible-playbook -i <path/to/the/inventory.ini>
playbooks/rollback/site.yml --extra-vars
"@<path/to/the/vars.json>" --tags
ambari-rollback,etc-config-rollback
-
Rollback Kerberos ansible-playbook -i
<path/to/the/inventory.ini> playbooks/rollback/site.yml
--extra-vars "@<path/to/the/vars.json>" --tags
kerberos-rollback
-
Rollback HDP Services:
Run the following command for all HDP services installed in the
cluster in ansible-playbook -i
<path/to/the/inventory.ini> playbooks/rollback/site.yml
--extra-vars "@<path/to/the/vars.json>" --tags
<service-rollback-tag>
The <service-rollback-tag> defaults to
<service>-rollback, where
<service> is replaced by the name of
the HDP service to be rolled back.
For Ambari Infra Solr, the
<service-rollback-tag> tag must be
infra-solr-rollback.
You can skip some of the services that your cluster may not require.
However, some services are dependent on each other. Cloudera
recommends you to rollback in the order listed below.
- zookeeper-rollback
- infra-solr-rollback
- ranger-rollback
- ranger-kms-rollback
- hdfs-rollback
- yarn-rollback
- Kafka-rollback
- hbase-rollback
- atlas-rollback
- hive-rollback
- oozie-rollback