Xuze Yang created RANGER-3945:
---------------------------------

             Summary: enable-agent.sh can't disable sqoop and kylin's 
properties file
                 Key: RANGER-3945
                 URL: https://issues.apache.org/jira/browse/RANGER-3945
             Project: Ranger
          Issue Type: Bug
          Components: plugins
    Affects Versions: 2.1.0
            Reporter: Xuze Yang


Take sqoop for example, when the behaviour is disable, the authName will be "". 
{code:java}
    if [ "${action}" = "enable" ]
    then
        
authName="org.apache.ranger.authorization.sqoop.authorizer.RangerSqoopAuthorizer"
    else
        authName=""
    fi {code}
AuthName will be passed into the addOrUpdatePropertyToFile method as second 
parameter.
{code:java}
addOrUpdatePropertyToFile org.apache.sqoop.security.authorization.validator 
$authName ${fn} {code}
However, when $authName is "", $authName will not be considered as a parameter. 
AddOrUpdatePropertyToFile will think there only two parameters and then caused 
a series of errors.
{code:java}
addOrUpdatePropertyToFile(){
    checkPropertyInFile $1 $3
    if [ $? -eq 1 ]
    then
        addPropertyToFile $1 $2 $3
    else
        updatePropertyToFile $1 $2 $3
    fi
} {code}
In addition, kafka also needs to modify server.properties but there is no 
corresponding implementation in this script.



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

Reply via email to