Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Ambari keeps old version as current after rolling upgrade 100%

avatar
Rising Star

Rolling upgrade is 100%, but Ambari still keeps the older version as current, and new version as "upgrade in progress", any idea? it is Ambari 2.1.1, upgrading from HDP 2.2.0 to 2.2.8.

1 ACCEPTED SOLUTION

avatar
New Contributor

You can finalize the upgrade using:

ambari-server set-current --cluster-name=$CLUSTERNAME \
                          --version-display-name=$VERSION_NAME

If an automatic upgrade using Ambari seems incomplete, the documentation for the manual upgrade is a good reference for what you may need to follow up with: http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_upgrading_Ambari/content/_manual_minor_up...

View solution in original post

2 REPLIES 2

avatar
New Contributor

You can finalize the upgrade using:

ambari-server set-current --cluster-name=$CLUSTERNAME \
                          --version-display-name=$VERSION_NAME

If an automatic upgrade using Ambari seems incomplete, the documentation for the manual upgrade is a good reference for what you may need to follow up with: http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_upgrading_Ambari/content/_manual_minor_up...

avatar

If you still run into issues, most likely one of the hosts still has components on an older version. You can triage these by running some SQL queries, found here https://community.hortonworks.com/articles/2473/rolling-upgrade-express-upgrade-in-ambari.html

For the problematic hosts, make sure to call hdp-select set <comp> <version>, and then restart them (using Ambari if you can; if they get queued, there are ways to "pause" the Rolling Upgrade so that other actions can still run.) In the worst case, you can always update the database manually, or use RU Magician, as described in the link above.

-- Check the repo version state SELECT rv.version, cv.state
FROM repo_version rv 
JOIN cluster_version cv ON rv.repo_version_id = cv.repo_version_id 
ORDER BY rv.version ASC; 

-- Check the hosts SELECT rv.version, h.host_name, hv.state 
FROM repo_version rv 
JOIN host_version hv ON rv.repo_version_id = hv.repo_version_id 
JOIN hosts h ON hv.host_id = h.host_id 
ORDER BY rv.version ASC, h.host_name; 

-- Find the components on the wrong version, 
-- call "hdp-select set <comp> <version>", check the config symlinks, and restart them manually
SELECT hcs.service_name, hcs.component_name, h.host_name, hcs.version 
FROM hostcomponentstate hcs 
JOIN hosts h ON hcs.host_id = h.host_id 
ORDER BY hcs.version ASC, hcs.service_name, hcs.component_name, h.host_name;