----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60249/#review178450 -----------------------------------------------------------
Fix it, then Ship it! Run unit ambari-server unit tests and post results here. Perform manual testing of upgrade scenarios eg. install a cluster that has Kafka an older version (e.g. 2.4 or 2.5.1) of Ambari that doesn't have the feature for setting rack info for Kafka. Verify that Kakfa works as expected. Than upgrade Ambari on the existing cluster to higher version that has the feature for setting rack info for Kafka and verify that Kafka still works as expected. ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py Line 104 (original), 104 (patched) <https://reviews.apache.org/r/60249/#comment252447> According to https://issues.apache.org/jira/browse/KAFKA-1215 rack awarness only supported starting from version 0.10.0.0. Shouldn't this change be implemented in common-services/KAFKA/0.10.0 instead of common-services/KAFKA/0.8.1 ? If setting ```broker.rack``` can cause issues for older Kafka version that doesn't support rack awarness than the setting of ```broker.rack``` has to be added to the scripts of the appropriate Kafka version on Ambari stack definition or via stack_features. ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py Lines 106-115 (patched) <https://reviews.apache.org/r/60249/#comment252445> The ```params.all_racks``` provides only access to rack info that was set up for hosts within ambari. However there rack info may come from a custom script in that case the information in ```params.all_racks``` won't have correct data. Use the topology script file to figure out the rack information for the current cluster. The path to the topology script is found in ```core-site/net.topology.script.file.name``` The topology script file accepts one or more host fqdn as input parameter and will return to stdout the rack info for the given hosts. - Sebastian Toader On June 20, 2017, 11:17 p.m., Ambud Sharma wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60249/ > ----------------------------------------------------------- > > (Updated June 20, 2017, 11:17 p.m.) > > > Review request for Ambari and Alejandro Fernandez. > > > Repository: ambari > > > Description > ------- > > Ambari rack awareness for Kafka. > https://issues.apache.org/jira/browse/AMBARI-21234 > > As an operations person it would be nice to manage Kafka rack awareness via > Ambari. Ambari allows node rack information to be configured and this > information can then be pulled in the Kafka stack and populated in the > server.properties file for Kafka. > Design: > This stack change uses the /clusterHostInfo/all_hosts and > /clusterHostInfo/all_racks paths and materializes them to a variable. Then it > uses linear search to find this node in the list of all hosts and it's > corresponding rack id. This information is then stored in a variable called > rack and which is materialized during the configure method of the broker > scripts. > This stack change relies on the node rack information stored in Ambari > therefore will enable both Ambari UI and Blueprints to be used for setting up > Kafka broker rack information. > > > Diffs > ----- > > > ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka.py > 680dd32802 > > ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py > 9acc1ef203 > > > Diff: https://reviews.apache.org/r/60249/diff/1/ > > > Testing > ------- > > Manually deployed Kafka cluster and verified the broker.rack property is > correctly populated. > > > Thanks, > > Ambud Sharma > >
