Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails on HDP 2.5: "cannot import name format hdp_stack_version" #11

Open
rabejens opened this issue Dec 7, 2016 · 1 comment
Open

Comments

@rabejens
Copy link

rabejens commented Dec 7, 2016

I am trying to install this on HDP 2.5, and I get:

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CASSANDRA/package/scripts/clients.py", line 38, in <module>
    clients().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CASSANDRA/package/scripts/clients.py", line 32, in install
    import params
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CASSANDRA/package/scripts/params.py", line 16, in <module>
    from resource_management.libraries.functions.version import format_hdp_stack_version, compare_versions
ImportError: cannot import name format_hdp_stack_version
@juan-echeverria
Copy link

juan-echeverria commented Dec 9, 2016

Hello @rabejens. I was able to fix that error doing the following:

1-) Go to the script /var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CASSANDRA/package/scripts/clients.py and, in the affected line, replace format_hdp_stack_version with format_stack_version.

2-) In my case, a second error appeared after fixing the previous one. The error was the following:

Traceback (most recent call last): File "/var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CASSANDRA/package/scripts/cassandra_master.py", line 60, in <module> Cassandra_Master().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute method(env) File "/var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CASSANDRA/package/scripts/cassandra_master.py", line 46, in start self.configure(env) File "/var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CASSANDRA/package/scripts/cassandra_master.py", line 35, in configure cassandra() File "/var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CASSANDRA/package/scripts/cassandra.py", line 29, in cassandra recursive=True File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 114, in __new__ cls(names_list.pop(0), env, provider, **kwargs) File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 147, in __init__ raise Fail("%s received unsupported argument %s" % (self, key)) resource_management.core.exceptions.Fail: Directory['/var/log/cassandra'] received unsupported argument recursive

For this case, you should go to that script /var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CASSANDRA/package/scripts/cassandra.py and replace recursive=True for create_parents=True.

I hope this can help you too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants