ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Onischuk" <aonis...@hortonworks.com>
Subject Review Request 35780: Cannot stop HDFS components non-root agent + umask 027
Date Tue, 23 Jun 2015 08:46:52 GMT

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

Review request for Ambari and Dmitro Lisnichenko.


Bugs: AMBARI-12085
    https://issues.apache.org/jira/browse/AMBARI-12085


Repository: ambari


Description
-------

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


Diffs
-----

  ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/service_check.py
7a1e6b7 
  ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
11076aa 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py c57a422 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py 646432d 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py 3df09ff 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_nfsgateway.py 8ac7cf8 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_snamenode.py 3269eda 
  ambari-server/src/test/python/stacks/2.0.6/HDFS/test_zkfc.py f4e6b19 

Diff: https://reviews.apache.org/r/35780/diff/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message