Hi Ganzalo, U are right, i’ve taken ranger admin component as an example. Where should I look to find out what is causing this hook to trigger? I think i’ve missed some imports or config properties, but I can’t find anything related to hook.
Regards, Andrey > 20 окт. 2017 г., в 20:07, Gonzalo Herreros <[email protected]> написал(а): > > As the name implies, those hooks trigger on any component installation. > However if you see that line source, it should not execute unless you have > the Ranger Admin component in the cluster. > > If you do have Ranger installed, then it should have the ranger-env set, have > a look or delete and reinstall the service. > It's also possible your component configurations overrides other services, > double check your service configurations folder. > Or than your service has a component that makes ambari think Ranger is > installed. > > Regards, > Gonzalo > >> On 20 October 2017 at 17:12, Markovich <[email protected]> wrote: >> 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 >
