Support Questions

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

Unable to remove older installations after upgrade to HDP 3.0.1

avatar
New Contributor

I've tried the procedure on this page:

https://community.hortonworks.com/articles/202904/how-to-remove-all-previous-version-hdp-directories...

on a freshly upgraded HDP setup (version 3.0.1). But when I launch the request it immediately errors out with this in the output:

stdout:

	2018-12-19 10:38:04,388 - call[('ambari-python-wrap', u'/usr/bin/hdp-select', 'versions')] {}<br>	2018-12-19 10:38:04,416 - call returned (0, '2.6.2.14-5\n2.6.5.0-292\n3.0.1.0-187')<br>	2018-12-19 10:38:04,416 - available versions: ['2.6.2.14-5', '2.6.5.0-292', '3.0.1.0-187']<br>	2018-12-19 10:38:04,417 - version 2.6.2.14-5 added to remove<br><br>	Command failed after 1 tries

stderr:

Traceback (most recent call last):<br>  File "/var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py", line 119, in <module><br>  RemovePreviousStacks().execute()<br>  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 351, in execute<br>  method(env)<br>  File "/var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py", line 49, in actionexecute<br>  self.remove_stack_version(structured_output, low_version)<br>  File "/var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py", line 54, in remove_stack_version<br>  packages_to_remove = self.get_packages_to_remove(version)<br>  File "/var/lib/ambari-agent/cache/custom_actions/scripts/remove_previous_stacks.py", line 77, in get_packages_to_remove<br>  all_installed_packages = self.pkg_provider.all_installed_packages()<br>AttributeError: 'YumManager' object has no attribute 'all_installed_packages'

A quick google did not return anything usefull. But it looks like the some of the supporting code for this is missing or we are missing a extra library somewhere?

1 ACCEPTED SOLUTION

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
2 REPLIES 2

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
New Contributor

I can confirm that this solution worked for me.

Thanks!