You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/06/10 06:26:00 UTC

[jira] [Commented] (IMPALA-12198) Create RANGER_LOG_DIR if it doesn't exist for kill-ranger-server.sh

    [ https://issues.apache.org/jira/browse/IMPALA-12198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17731168#comment-17731168 ] 

ASF subversion and git services commented on IMPALA-12198:
----------------------------------------------------------

Commit 893c55b5239d7b6e7bda0499fbbe9ba0547561a6 in impala's branch refs/heads/master from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=893c55b52 ]

IMPALA-12198: Create $RANGER_LOG_DIR before stopping in kill-ranger-server.sh

If the $RANGER_LOG_DIR directory doesn't exist, then Ranger's
ranger-admin-services.sh will fail to issue the stop command
because it tries and fails to write to that directory. Ranger's
script believes that it has issued the stop to Ranger, so it
waits for 30 seconds for Ranger to stop. When Ranger doesn't stop,
it kills Ranger. This is an unnecessary delay in stopping Ranger.
It is common if a developer runs bin/clean.sh after starting
Ranger.

This modifies kill-ranger-server.sh to create $RANGER_LOG_DIR
before running ranger-admin-services.sh with the stop command.
Since the directory exists, the stop command is successfully
issued and the script won't wait 30 seconds.

Testing:
 - Hand testing with starting Ranger, then running bin/clean.sh,
   then running kill-ranger-server.sh

Change-Id: I6ba5a90172affde3949e9f9a7618bde0dfa8c309
Reviewed-on: http://gerrit.cloudera.org:8080/20028
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Create RANGER_LOG_DIR if it doesn't exist for kill-ranger-server.sh
> -------------------------------------------------------------------
>
>                 Key: IMPALA-12198
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12198
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Infrastructure
>    Affects Versions: Impala 4.3.0
>            Reporter: Joe McDonnell
>            Assignee: Joe McDonnell
>            Priority: Major
>
> Ranger's ranger-admin-services.sh relies on being able to log to $RANGER_LOG_DIR for the stop command. If $RANGER_LOG_DIR doesn't exist (which can happen when bin/clean.sh runs), then testdata/bin/kill-ranger-server.sh will fail with this error:
> {noformat}
> Getting pid from /tmp/rangeradmin.pid ..
> Found Apache Ranger Admin Service with pid 23263, Stopping it...
> /opt/Impala-Toolchain/cdp_components-40643771/ranger-2.3.0.7.2.18.0-41-admin/ews/ranger-admin-services.sh: line 129: /home/joemcdonnell/upstream/Impala/logs/cluster/ranger/catalina.out: No such file or directory
> Shutdown in progress. Will check after 2 secs again..
> Shutdown in progress. Will check after 2 secs again..
> ...
> Initial kill failed, getting serious now...
> Apache Ranger Admin Service with pid 23263 has been stopped.{noformat}
> The missing directory error means that the original stop command never even executed. Ranger will not stop on its own, so this will always wait for 30 seconds and then do a hard kill. This delays stopping Ranger for no reason.
> If kill-ranger-server.sh creates RANGER_LOG_DIR before running ranger-admin-services.sh, then the original stop command succeeds immediately.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org