James Clarke created AMBARI-22532:
-------------------------------------

             Summary: Package installation fails on Ubuntu if repo ID contains 
URL encoded characters
                 Key: AMBARI-22532
                 URL: https://issues.apache.org/jira/browse/AMBARI-22532
             Project: Ambari
          Issue Type: Bug
          Components: ambari-agent, ambari-sever
    Affects Versions: 2.6.0
         Environment: Ubuntu14
Ambari 2.6.0.0
HDP 2.6.3
Offline
            Reporter: James Clarke


I was installing an HDP 2.6.3 stack with Ambari 2.6.0.0 on Ubuntu14 and hit the 
following error in package installation:

"No package found for hadooplzo-${stack_version}(hadooplzo-(\\d|-)+$) because 
the available packages list is an empty array."

In apt.py a string comparison is made on the repo ID vs information returned by 
apt-cache dump:

if repo_id in package[2]:

In my case the package info contained a URL encoded '_' as %5F but this was not 
in the repo ID:

repo_id=example_mirror_hdp_HDP_ubuntu14_2.6.3.0-235
package[2]=example_mirror%5fhdp_HDP_ubuntu14_2.6.3.0-235_dists_HDP_main_binary-amd64_Packages

I was able to work around this by editing 
/usr/lib/ambari-agent/lib/resource_management/core/providers/package/apt.py to 
URL decode the strings before comparison.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to