You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Andrew Onischuk (JIRA)" <ji...@apache.org> on 2015/06/23 10:49:01 UTC
[jira] [Resolved] (AMBARI-12085) Cannot stop HDFS components
non-root agent + umask 027
[ https://issues.apache.org/jira/browse/AMBARI-12085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Onischuk resolved AMBARI-12085.
--------------------------------------
Resolution: Fixed
Committed to trunk and branch-2.1
> Cannot stop HDFS components non-root agent + umask 027
> ------------------------------------------------------
>
> Key: AMBARI-12085
> URL: https://issues.apache.org/jira/browse/AMBARI-12085
> Project: Ambari
> Issue Type: Bug
> Reporter: Andrew Onischuk
> Assignee: Andrew Onischuk
> Fix For: 2.1.0
>
>
> SITUATION:
> 1) Ambari 2.1.0 build #1105
> 2) non-root server + non-root agents + umask 027
> 3) Installed HDP 2.3 core (see attached for components + layout)
> 4) customized service accounts (threw a "j" in front of everything)
> 5) visudo for non-root agent is setup as shown below
> 6) once cluster is installed, I went to the host with the namenode and from
> Ambari web, said to stop namenode. ambari returned green but the process was
> not killed (pid file was removed though).
> PROBLEM:
> Ambari is not able to read the .pid file unless the agent non-root user is in
> the "jhadoop" group (to get read access).
>
>
>
> [vagrant@c6401 jhdfs]$ ls -l
> total 12
> -rw-r----- 1 jhdfs jhadoop 6 Jun 16 17:51 hadoop-jhdfs-journalnode.pid
> -rw-r----- 1 jhdfs jhadoop 6 Jun 16 17:51 hadoop-jhdfs-namenode.pid
> -rw-r----- 1 jhdfs jhadoop 6 Jun 16 17:52 hadoop-jhdfs-zkfc.pid
> [vagrant@c6401 jhdfs]$ id ambari
> uid=502(ambari) gid=503(ambari) groups=503(ambari)
>
> SOLUTION:
> This part of Stop should not be run as agent non-root "ambari", but as the
> jhdfs user (because that use should be able to read the pid). Otherwise, we
> end up with ambari deleting the pid (because it can't read the pid file), so
> then the component stop fails.
>
>
>
> 2015-06-16 17:13:03,137 - u"File['/var/run/hadoop/jhdfs/hadoop-jhdfs-namenode.pid']" {'action': ['delete'], 'not_if': 'ls /var/run/hadoop/jhdfs/hadoop-jhdfs-namenode.pid >/dev/null 2>&1 && ps -p `cat /var/run/hadoop/jhdfs/hadoop-jhdfs-namenode.pid` >/dev/null 2>&1'}
>
> mahadev FYI
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)