[ 
https://issues.apache.org/jira/browse/AMBARI-26538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dahyun Ko updated AMBARI-26538:
-------------------------------
    Description: 
h3. Summary

The variable stack_version is used before initialization, which throws an error 
when using Ranger.
{code:java}
# 
ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py

def setup_ranger_plugin(...):
if not plugin_home:
  stack_root = Script.get_stack_root()
  service_name = str(service_name).lower()
  plugin_home = 
format("{stack_root}/{stack_version}/ranger-{service_name}-plugin/")

#...

if stack_version_override is None:
  stack_version = get_stack_version(component_select_name)
else:
  stack_version = stack_version_override{code}

  was:
Summary

 
{code:java}
ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py{code}
 


> Fix stack_version initialization in setup_ranger_plugin
> -------------------------------------------------------
>
>                 Key: AMBARI-26538
>                 URL: https://issues.apache.org/jira/browse/AMBARI-26538
>             Project: Ambari
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Dahyun Ko
>            Priority: Major
>             Fix For: 3.1.0
>
>
> h3. Summary
> The variable stack_version is used before initialization, which throws an 
> error when using Ranger.
> {code:java}
> # 
> ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
> def setup_ranger_plugin(...):
> if not plugin_home:
>   stack_root = Script.get_stack_root()
>   service_name = str(service_name).lower()
>   plugin_home = 
> format("{stack_root}/{stack_version}/ranger-{service_name}-plugin/")
> #...
> if stack_version_override is None:
>   stack_version = get_stack_version(component_select_name)
> else:
>   stack_version = stack_version_override{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to