Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Restarting Knox gateway during upgrade to HDP 2.6.1.0 fails

Solved Go to solution

Restarting Knox gateway during upgrade to HDP 2.6.1.0 fails

New Contributor

I am attempting to Express Upgrade from HDP 2.6.0.3 to HDP 2.6.1.0 and it fails when it gets to the "Restarting Knox Gateway on ..." step. The message in stderr is this:

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py", line 217, in <module>
    KnoxGateway().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 329, in execute
    method(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 850, in restart
    self.start(env, upgrade_type=upgrade_type)
  File "/var/lib/ambari-agent/cache/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py", line 135, in start
    self.configure(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 119, in locking_configure
    original_configure(obj, *args, **kw)
  File "/var/lib/ambari-agent/cache/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py", line 67, in configure
    knox()
  File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk
    return fn(*args, **kwargs)
  File "/var/lib/ambari-agent/cache/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py", line 100, in knox
    recursive_ownership = 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['/usr/hdp/current/knox-server/data/'] received unsupported argument recursive

stdout doesn't look like it contains anything useful.

gateway.log shows nothing because it isn't getting to the point where it tries to start it.

If I manually start knox it seems to start fine.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Restarting Knox gateway during upgrade to HDP 2.6.1.0 fails

Contributor

@Aaron Norton - Looks like the knox.py script on your cluster is still referring to an older parameter named 'recursive'

There was a fix done as part of AMBARI-14396 where the parameter was modified from 'recursive' to 'create_parents'

Can you try the following?

On your knox gateway host open this file: /var/lib/ambari-agent/cache/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py

Change to the following under line having text: os.path.join(params.knox_conf_dir, "topologies")],

owner = params.knox_user,
group = params.knox_group,
create_parents = True,
cd_access = "a",
mode = 0755,
recursive_ownership = True,

Ensure that the indentation is retained

See sample entry here

Thanks, Vivek

3 REPLIES 3
Highlighted

Re: Restarting Knox gateway during upgrade to HDP 2.6.1.0 fails

Contributor

@Aaron Norton - Looks like the knox.py script on your cluster is still referring to an older parameter named 'recursive'

There was a fix done as part of AMBARI-14396 where the parameter was modified from 'recursive' to 'create_parents'

Can you try the following?

On your knox gateway host open this file: /var/lib/ambari-agent/cache/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py

Change to the following under line having text: os.path.join(params.knox_conf_dir, "topologies")],

owner = params.knox_user,
group = params.knox_group,
create_parents = True,
cd_access = "a",
mode = 0755,
recursive_ownership = True,

Ensure that the indentation is retained

See sample entry here

Thanks, Vivek

Re: Restarting Knox gateway during upgrade to HDP 2.6.1.0 fails

New Contributor

I'm not sure how an old version of knox.py would have gotten there. Anyway I reverted snapshots back to before I did the upgrade and everything worked fine now. Something must have just gotten really messed up.

Re: Restarting Knox gateway during upgrade to HDP 2.6.1.0 fails

Contributor

@Aaron Norton - Please accept the answer if you think it was relevant to your question

Don't have an account?
Coming from Hortonworks? Activate your account here