-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71365/
-----------------------------------------------------------

(Updated 八月 29, 2019, 6:19 a.m.)


Review request for ranger, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, 
Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Nitin Galave, 
pengjianhua, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
Polavarapu, sam  rome, Venkat Ranganathan, Velmurugan Periasamy, Qiang Zhang, 
and Zsombor Gegesy.


Bugs: RANGER-2549
    https://issues.apache.org/jira/browse/RANGER-2549


Repository: ranger


Description (updated)
-------

The install.sh will print 'Command not found' when installing the solr audit 
log module, as follow:

[root@wkh001 solr_for_audit_setup]# ./setup.sh
./setup.sh: line 29: log: Command not found
Then I analyse the install.sh, there is one error code, as follow: 

if  test -z "$validateProperty" ; then log "[E] '$1' not found in $2 file while 
getting....!!"; exit 1; fi
Because the function log is undefined, and in other places, we use echo to 
print log, We need to be unified as 'echo'.

When I modify this bug, then execute setup.sh, it shows another error, as 
follow:

setup.sh: line 68:[: Too many parameters
Then I find another logic bug, if you don't config JAVA_HOME in 
install.properties, CONFIG_JAVA_HOME will get an error message and influence 
subsequent processe.

CONFIG_JAVA_HOME=$(get_prop 'JAVA_HOME' $PROPFILE)
JAVA_HOME=${CONFIG_JAVA_HOME:-$JAVA_HOME}

So I modified two places, and test in three scenes, first is that JAVA_HOME is 
nonexistent, second is that JAVA_HOME is not configured, like 'JAVA_HOME=', 
third is that JAVA_HOME is configured.

Please check my patch, thanks.


Diffs (updated)
-----

  security-admin/contrib/solr_for_audit_setup/setup.sh f059c03 


Diff: https://reviews.apache.org/r/71365/diff/2/

Changes: https://reviews.apache.org/r/71365/diff/1-2/


Testing
-------


File Attachments (updated)
----------------

0001-RANGER-2549-There-are-two-logic-errors-when-installi.patch
  
https://reviews.apache.org/media/uploaded/files/2019/08/29/d40e5b4b-71e5-45e0-a8de-de43e3fd8f0f__0001-RANGER-2549-There-are-two-logic-errors-when-installi.patch


Thanks,

Kehua Wu

Reply via email to