-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34316/
-----------------------------------------------------------
Review request for Ambari and Myroslav Papirkovskyy.
Bugs: AMBARI-1241
https://issues.apache.org/jira/browse/AMBARI-1241
Repository: ambari
Description
-------
On ubuntu, non-root user for ambari server + umask 027 fails to start server:
root@ip-10-237-169-130:~# ambari-server start
Using python /usr/bin/python2.7
Starting ambari-server
Ambari Server running with administrator privileges.
About to start PostgreSQL
Organizing resource files at /var/lib/ambari-server/resources...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start....................
ERROR: Exiting with exit code -1.
REASON: Ambari Server java process died with exitcode 255. Check
/var/log/ambari-server/ambari-server.out for more information.
root@ip-10-237-169-130:~# more /var/log/ambari-server/ambari-server.out
[EL Warning]: metadata: 2015-03-20
13:09:03.999--ServerSession(538886250)--The reference column name
[resource_type_id] mapped on the element [field permissions] does not
correspond to a valid id or b
asic field/column on the mapping reference. Will use referenced column name
as provided.
[EL Info]: 2015-03-20 13:09:05.97--ServerSession(538886250)--EclipseLink,
version: Eclipse Persisten
ce Services - 2.5.2.v20140319-9ad6abd
[EL Info]: connection: 2015-03-20
13:09:06.239--ServerSession(538886250)--file:/usr/lib/ambari-serve
r/ambari-server-2.0.0.1228.jar_ambari-server_url=jdbc:postgresql://localhost/ambari_user=ambari
logi
n successful
root@ip-10-237-169-130:~# umask
0027
root@ip-10-237-169-130:~#
For sanity, tested same with root to start ambari server) + umask 027, that
works fine:
About to start PostgreSQL
Configuring local database...
Connecting to local database...done.
Configuring PostgreSQL...
Extracting system views...
.ambari-admin-2.0.0.1228.jar
..
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
root@ip-10-239-171-88:~# ambari-server start
Using python /usr/bin/python2.7
Starting ambari-server
Ambari Server running with administrator privileges.
About to start PostgreSQL
Organizing resource files at /var/lib/ambari-server/resources...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start....................
Ambari Server 'start' completed successfully.
root@ip-10-239-171-88:~# umask
0027
root@ip-10-239-171-88:~#
I also tested just non-root account for ambari-server with umask 022 and that
worked fine.
Ambari Server umask result
root
022
works
root
027
works
non-root
022
works
non-root
027
fails
Diffs
-----
ambari-server/src/main/python/ambari_server/serverSetup.py 4547145
ambari-server/src/test/python/TestAmbariServer.py 5c05ad3
Diff: https://reviews.apache.org/r/34316/diff/
Testing
-------
mvn clean test
Thanks,
Andrew Onischuk