Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ambari old version delete not working correctly

Ambari old version delete not working correctly

I executed the following rest api command to delete old versions of HDP.

Seems there is a bug in the script. the version is not getting deleted.A '/' is missing in the command that is to be executed for the cleaning.

Env used: Ambari - , HDP 2.6

curl 'http://ambarihost:8080/api/v1/clusters/cluster01/requests' -u admin:admin -H "X-Requested-By: ambari" -X POST -d'{"RequestInfo":{"context":"remove_previous_stacks", "action" : "remove_previous_stacks", "parameters" : {"version":""}}, "Requests/resource_filters": [{"hosts":"host1,host2,host3"}]}'	

Results are like this
2017-08-31 17:21:52,102 - call[('ambari-python-wrap', u'/usr/bin/hdp-select', 'versions')] {}
2017-08-31 17:21:52,156 - call returned (0, '\n2.4.0.0-169\n2.6.0.3-8')
2017-08-31 17:21:52,157 - available versions: ['', '', '']
2017-08-31 17:21:52,158 - version added to remove
2017-08-31 17:21:52,421 - Removing /usr/hdp/
2017-08-31 17:21:52,421 - Execute[('rm', '-f', '/usr/hdp2.3.2.0-2800')] {'sudo': True}

Command completed successfully!
Don't have an account?
Coming from Hortonworks? Activate your account here