ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markovich <amriv...@gmail.com>
Subject Why hook is executed when installing custom service
Date Fri, 20 Oct 2017 16:12:31 GMT
Hello everyone!

I'm creating a custom service, when Ambari is going to install my service
it's trying to execute some hook from HDP 2.0.6. And in this hook there is
hardcoded ranger-env propertie.

Why my service triggers this hook?
What can be done to avoid this?

Regards,
Andrey

Here is some logs from my service install. My python script isn't being
triggered...

stderr:   /var/lib/ambari-agent/data/errors-406.txt

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py",
line 35, in <module>
    BeforeAnyHook().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
line 329, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py",
line 26, in hook
    import params
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py",
line 254, in <module>
    user_to_groups_dict[ranger_user] = [ranger_group]
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/config_dictionary.py",
line 73, in __getattr__
    raise Fail("Configuration parameter '" + self.name + "' was not
found in configurations dictionary!")
resource_management.core.exceptions.Fail: Configuration parameter
'ranger-env' was not found in configurations dictionary!
Error: Error: Unable to run the custom hook script ['/usr/bin/python',
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py',
'ANY', '/var/lib/ambari-agent/data/command-406.json',
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY',
'/var/lib/ambari-agent/data/structured-out-406.json', 'INFO',
'/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1', '']

stdout:   /var/lib/ambari-agent/data/output-406.txt

2017-10-20 12:07:42,825 - Stack Feature Version Info: Cluster
Stack=2.6, Cluster Current Version=2.6.2.0-205, Command Stack=None,
Command Version=2.6.2.0-205 -> 2.6.2.0-205
2017-10-20 12:07:42,836 - Using hadoop conf dir:
/usr/hdp/current/hadoop-client/conf
Error: Error: Unable to run the custom hook script ['/usr/bin/python',
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py',
'ANY', '/var/lib/ambari-agent/data/command-406.json',
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY',
'/var/lib/ambari-agent/data/structured-out-406.json', 'INFO',
'/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1', '']

Command failed after 1 tries

Mime
View raw message