You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2016/11/08 20:09:58 UTC
[jira] [Commented] (AMBARI-18824) MOTD Can Prevent WebHCat From
Shutting Down
[ https://issues.apache.org/jira/browse/AMBARI-18824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15648660#comment-15648660 ]
Hadoop QA commented on AMBARI-18824:
------------------------------------
{color:green}+1 overall{color}. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12838021/AMBARI-18824.patch
against trunk revision .
{color:green}+1 @author{color}. The patch does not contain any @author tags.
{color:green}+1 tests included{color}. The patch appears to include 1 new or modified test files.
{color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings.
{color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings.
{color:green}+1 core tests{color}. The patch passed unit tests in ambari-server.
Test results: https://builds.apache.org/job/Ambari-trunk-test-patch/9181//testReport/
Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/9181//console
This message is automatically generated.
> MOTD Can Prevent WebHCat From Shutting Down
> -------------------------------------------
>
> Key: AMBARI-18824
> URL: https://issues.apache.org/jira/browse/AMBARI-18824
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Affects Versions: 2.4.0
> Reporter: Jonathan Hurley
> Assignee: Jonathan Hurley
> Priority: Blocker
> Fix For: 2.4.2
>
> Attachments: AMBARI-18824.patch
>
>
> There was code added in AMBARI-12695 (later corrected by AMBARI-18684) which tries to kill WebHCat if it doesn't stop with its own stop command.
> Both patches use the {{as_user}} function to wrap the call in a bash login:
> {code}
> ps -p `su hcat -l -s /bin/bash -c 'cat /var/run/webhcat/webhcat.pid'` >/dev/null 2>&1
> {code}
> This, however, causes problems where there is a MOTD:
> {code}
> ERROR: Process ID list syntax error.
> ********* simple selection ********* ********* selection by list *********
> -A all processes -C by command name
> -N negate selection -G by real group ID (supports names)
> -a all w/ tty except session leaders -U by real user ID (supports names)
> -d all except session leaders -g by session OR by effective group name
> -e all processes -p by process ID
> -q by process ID (unsorted & quick)
> T all processes on this terminal -s processes in the sessions given
> a all w/ tty, including other users -t by tty
> g OBSOLETE -- DO NOT USE -u by effective user ID (supports names)
> r only running processes U processes for specified users
> x processes w/o controlling ttys t by tty
> *********** output format ********** *********** long options ***********
> -o,o user-defined -f full --Group --User --pid --cols --ppid
> -j,j job control s signal --group --user --sid --rows --info
> -O,O preloaded -o v virtual memory --cumulative --format --deselect
> -l,l long u user-oriented --sort --tty --forest --version
> -F extra full X registers --heading --no-heading --context
> --quick-pid
> ********* misc options *********
> -V,V show version L list format codes f ASCII art forest
> -m,m,-L,-T,H threads S children in sum -y change -l format
> -M,Z security data c true command name -c scheduling class
> -w,w wide output n numeric WCHAN,UID -H process hierarchy
> {code}
> That's not good - why is it giving us back a bad command syntax? Here's the reason:
> {code}
> [root@ijzs-c229todgsecha-r6-re1-3 ~]# su hcat -l -s /bin/bash -c 'cat /var/run/webhcat/webhcat.pid'
> This is MOTD message :)
> 25672
> {code}
> *The MOTD is messing up the output from commands for the {{hcat}} user. Because we rely on the error code of {{ps}}, the same non-zero code is used for a bad command and a missing process ID*.
> Since the PID is world-readable, we don't need to run the {{only_if}} checks as a separate user.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)