Andrii Tkach created AMBARI-13835:
-------------------------------------

             Summary: After stack_upgrade 2.2 to 2.3 hook script fails due to 
missing /configurations/tez-site/tez.am.view-acls value
                 Key: AMBARI-13835
                 URL: https://issues.apache.org/jira/browse/AMBARI-13835
             Project: Ambari
          Issue Type: Bug
          Components: ambari-web
    Affects Versions: 2.1.2
            Reporter: Andrii Tkach
            Assignee: Andrii Tkach
            Priority: Critical
             Fix For: 2.1.3


After upgrading to 2.1.x hook script fails due to missing 
{{/configurations/tez-site/tez.am.view-acls}} value.  The following errors may 
be seen when executing agent-side scripts (start, stop, etc...):

{noformat}
File 
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/config_dictionary.py",
 line 81, in __getattr__ 
raise Fail("Configuration parameter '" + self.name + "' was not found in 
configurations dictionary!") 
resource_management.core.exceptions.Fail: Configuration parameter 
'tez.am.view-acls' was not found in configurations dictionary! 
{noformat}

{noformat}
Error: Error: Unable to run the custom hook script ['/usr/bin/python2.7', 
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py',
 'ANY', '/var/lib/ambari-agent/data/command-8752.json', 
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY', 
'/var/lib/ambari-agent/data/structured-out-8752.json', 'INFO', 
'/var/lib/ambari-agent/tmp’] 
{noformat}

*Cause*
It appears that the cause is from this line:
{code:title=stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py:220}
tez_am_view_acls = config['configurations']['tez-site']["tez.am.view-acls"]
{code}

Since {{/configurations/tez-site/tez.am.view-acls}} was not set, the python 
script failed.

*Solution*
Either protect this call using something like
{code}
default("/configurations/tez-site/tez.am.view-acls", "*")
{code}

Or ensure the value is set during the upgrade process when transitioning to 
Ambari 2.1.0.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to