ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hurley <jhur...@hortonworks.com>
Subject Re: HDP install issues about hdp-select
Date Wed, 15 Jun 2016 20:03:49 GMT
I believe this is because you have a "hadoop" directory in /usr/hdp ... /usr/hdp should only
contain versions and "current". If there's another directory, it would cause the hdp-select
tool to fail.

On Jun 15, 2016, at 3:23 PM, Pawel Akonom <pawel.akonom@vnomic.com<mailto:pawel.akonom@vnomic.com>>
wrote:

Hi,

I have some problems with hadoop cluster scratch installation (not upgrade). Versions I am
using:


Ambari version: 2.2.2.0
HDP stack version: 2.3.4.7


Zookeper installation fails on step:

Execute['ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select
versions | grep ^2.3 | tail -1`'] {'only_if': 'ls -d /usr/hdp/2.3*'}

When I execute this command manually on bash I get error:

[root@hdp-vora-master ~]# ambari-python-wrap /usr/bin/hdp-select versions
Traceback (most recent call last):
  File "/usr/bin/hdp-select", line 378, in <module>
    printVersions()
  File "/usr/bin/hdp-select", line 235, in printVersions
    result[tuple(map(int, versionRegex.split(f)))] = f
ValueError: invalid literal for int() with base 10: 'hadoop'

The same problem is described in Hortonworks community:
https://community.hortonworks.com/questions/5811/install-of-hdp-fails-with-valueerror-invalid-liter.html

Workaround for this problem is to edit /usr/bin/hdp-select python script and modify printVersions()
function.

Function before:

# Print the installed packages
def printVersions():
  result = {}
  for f in os.listdir(root):
    if f not in [".", "..", "current", "share", "lost+found"]:
      result[tuple(map(int, versionRegex.split(f)))] = f
  keys = result.keys()
  keys.sort()
  for k in keys:
     print result[k]

Function after modification:

# Print the installed packages
def printVersions():
  result = {}
  for f in os.listdir(root):
    if f not in [".", "..", "current", "share", "lost+found"]:
      try:
        result[tuple(map(int, versionRegex.split(f)))] = f
      except:
        pass
  keys = result.keys()
  keys.sort()
  for k in keys:
     print result[k]

Hadoop cluster installation need to be automated so this workaround is not a solution. Script
/usr/bin/hdp-select appears during installation and it doesn't come with any rpm package.
It can be a bug in the script or maybe it fails only with some specific python versions only.

Do you know the problem? If so what can be the solution?

Thanks in advance,
Pawel


Mime
View raw message