-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33313/
-----------------------------------------------------------
(Updated April 22, 2015, 12:47 p.m.)
Review request for Ambari, Andrew Onischuk and Robert Levas.
Bugs: AMBARI-10562
https://issues.apache.org/jira/browse/AMBARI-10562
Repository: ambari
Description
-------
Problem:
Customization of the log and pid dir location using ambari, does not work with
Kafka and Knox.
After the install wizard error out I also noticed: (all Kafka/Knox pid/log dir
paths have a /mydisk/ custom location prefix appended)
* Starting Kafka/Knox from Ambari actually starts the processes but Ambari
thinks they died and goes red. On further investigation the /mydisk/run/kafka
and /mydisk/run/knox are empty so the pid files are not getting created. I
re-installed on fresh VM and ran the below to give kafka/knox users access to
those dirs before running install wizard but still got same error (even though
as those users I can write to those dirs)
chmod +x /mydisk/run
chmod +x /mydisk
Solution:
Since both Kafka and Knox come with bundled bash scripts that manages their
process lifecycle amongst other things and we have no control over them, an
agreed solution with was to use symlinks.
For example Kafka uses /usr/hdp/current/kafka-broker/bin/kafka bash to start,
where values are hardcoded as such
PID_DIR="/var/run/$APP_NAME" on which we have no control over as they are
bundled in the Kafka package.
Knox already uses symlinks by default, all we had to do is change said symlink
with the ambari managed location.
Diffs (updated)
-----
ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
0170116
ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/params.py
74c189e
ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py
9e20499
ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params.py
a04842e
ambari-server/src/test/python/stacks/2.2/KAFKA/test_kafka_broker.py a8b6693
ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py 8ffbd67
ambari-server/src/test/python/stacks/2.2/configs/default_custom_path_config.json
PRE-CREATION
Diff: https://reviews.apache.org/r/33313/diff/
Testing
-------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main ....................................... SUCCESS [6.912s]
[INFO] Apache Ambari Project POM ......................... SUCCESS [0.116s]
[INFO] Ambari Web ........................................ SUCCESS [29.655s]
[INFO] Ambari Views ...................................... SUCCESS [1.196s]
[INFO] Ambari Admin View ................................. SUCCESS [19.873s]
[INFO] Ambari Metrics Common ............................. SUCCESS [1.116s]
[INFO] Ambari Server ..................................... SUCCESS [2:39.489s]
[INFO] Ambari Agent ...................................... SUCCESS [9.179s]
[INFO] Ambari Client ..................................... SUCCESS [0.202s]
[INFO] Ambari Python Client .............................. SUCCESS [1.121s]
[INFO] Ambari Groovy Client .............................. SUCCESS [2.917s]
[INFO] Ambari Shell ...................................... SUCCESS [0.108s]
[INFO] Ambari Python Shell ............................... SUCCESS [0.637s]
[INFO] Ambari Groovy Shell ............................... SUCCESS [1.760s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:55.047s
[INFO] Finished at: Fri Apr 17 15:31:16 EEST 2015
[INFO] Final Memory: 108M/1125M
[INFO] ------------------------------------------------------------------------
Thanks,
Emil Anca