-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44795/#review123472
-----------------------------------------------------------




ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
 (line 78)
<https://reviews.apache.org/r/44795/#comment185712>

    It's useful here to include a comment with that that output looks like so 
it's easier for others to read.
    Why not ignore lines that begin with "-" after stripping whitespace 
characters?


- Alejandro Fernandez


On March 14, 2016, 5:31 p.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44795/
> -----------------------------------------------------------
> 
> (Updated March 14, 2016, 5:31 p.m.)
> 
> 
> Review request for Ambari and Andrew Onischuk.
> 
> 
> Bugs: AMBARI-15405
>     https://issues.apache.org/jira/browse/AMBARI-15405
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> # Installing bits for new registered version fails on suse11 if it is having 
> any other additional repo
> # This is because of a parsing error and out of index error in ambari-agent's 
> zypper.py file
> {code}
> 2016-03-10 15:12:19,018 - Package['ranger_2_3_4_0_3485*-admin'] {'use_repos': 
> ['base', 'HDP-2.3.4.0-3485', 'HDP-UTILS-2.3.4.0-3485'], 'skip_repos': []}
> 2016-03-10 15:12:19,194 - Package Manager failed to install packages. Error: 
> list index out of range
> Traceback (most recent call last):
> File 
> "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", 
> line 376, in install_packages
> skip_repos=[self.REPO_FILE_NAME_PREFIX + "*"] if OSCheck.is_redhat_family() 
> else [])
> File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", 
> line 154, in __init__
> self.env.run()
> File 
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", 
> line 158, in run
> self.run_action(resource, action)
> File 
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", 
> line 121, in run_action
> provider_action()
> File 
> "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py",
>  line 49, in action_install
> self.install_package(package_name, self.resource.use_repos, 
> self.resource.skip_repos)
> File 
> "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/zypper.py",
>  line 45, in install_package
> active_base_repos = self.get_active_base_repos()
> File 
> "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/zypper.py",
>  line 78, in get_active_base_repos
> if line_list[3].strip() == 'Yes' and line_list[2].strip().startswith("SUSE-"):
> IndexError: list index out of range
> 2016-03-10 15:12:19,918 - Installation of packages failed. Checking if 
> installation was partially complete
> {code}
> 
> 
> Diffs
> -----
> 
>   
> ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
>  a519ce0 
> 
> Diff: https://reviews.apache.org/r/44795/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>

Reply via email to