Romain Lenoel created AMBARI-9812:
-------------------------------------
Summary: Exception during after-INSTALL hook (HDP 2.0.6) if stack
version contains letters
Key: AMBARI-9812
URL: https://issues.apache.org/jira/browse/AMBARI-9812
Project: Ambari
Issue Type: Bug
Components: ambari-server, stacks
Affects Versions: 2.0.0
Reporter: Romain Lenoel
Priority: Critical
When trying to install a stack named "2.2.XXX" which simply extends HDP-2.2
(and so 2.0.6), the following exception is raised :
{code}
Traceback (most recent call last):
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py",
line 35, in <module>
AfterInstallHook().execute()
File
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
line 208, in execute
method(env)
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py",
line 31, in hook
setup_hdp_install_directory()
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py",
line 26, in setup_hdp_install_directory
if params.hdp_stack_version != "" and
compare_versions(params.stack_version_unformatted, '2.2') >= 0:
File
"/usr/lib/python2.6/site-packages/resource_management/libraries/functions/version.py",
line 73, in compare_versions
return cmp(_normalize(version1, desired_segments=max_segments),
_normalize(version2, desired_segments=max_segments))
File
"/usr/lib/python2.6/site-packages/resource_management/libraries/functions/version.py",
line 34, in _normalize
return [int(x) for x in v_list]
ValueError: invalid literal for int() with base 10: 'XXX'
{code}
The exception raises because of the use of the unformatted version name in the
following code {code}File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py",
line 26, in setup_hdp_install_directory
if params.hdp_stack_version != "" and
compare_versions(params.stack_version_unformatted, '2.2') >= 0{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)