----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41328/#review110247 -----------------------------------------------------------
ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py (line 80) <https://reviews.apache.org/r/41328/#comment170048> If we're going to use some Python voodoo, we should probably explain why we're doing it so that it's not in advertently removed. My guess is this slice does some sort of copy operation on the original collection - why are we doing this here? I didn't think the Directory resource was destructive to lists. ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py (line 215) <https://reviews.apache.org/r/41328/#comment170051> Same with above comment - why slice nothing out of the list? ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py (lines 227 - 231) <https://reviews.apache.org/r/41328/#comment170052> Can we use some self-documenting names here? "d" and "l" are not very intuitive. ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka_broker.py (lines 87 - 90) <https://reviews.apache.org/r/41328/#comment170050> Is this a Kafka only problem!? If it is, shouldn't it be fixed in Kafka? I'm always against special-casing bugs in the stack in Ambari and I want to understand more about why we need to do this workaround. - Jonathan Hurley On Dec. 14, 2015, 10:07 a.m., Dmitro Lisnichenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41328/ > ----------------------------------------------------------- > > (Updated Dec. 14, 2015, 10:07 a.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Jayush > Luniya, and Nate Cole. > > > Bugs: AMBARI-14362 > https://issues.apache.org/jira/browse/AMBARI-14362 > > > Repository: ambari > > > Description > ------- > > *Steps:* > Setup HDP 2.2.9 cluster with Ambari build #2.2.0.0-1281; the cluster has HA > enabled and setup with customized service users for all services > Did EU from HDP 2.2.9 to 2.3.2.0 > > Result: > Observed during EU that Kakfa broker restart failed on all hosts with error: > > {code} > Traceback (most recent call last): > File > "/var/lib/ambari-agent/cache/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka_broker.py", > line 101, in <module> > KafkaBroker().execute() > File > "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", > line 218, in execute > method(env) > File > "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", > line 496, in restart > self.stop(env, upgrade_type=upgrade_type) > File > "/var/lib/ambari-agent/cache/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka_broker.py", > line 88, in stop > user=params.kafka_user, > File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", > line 154, in __init__ > self.env.run() > File > "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", > line 158, in run > self.run_action(resource, action) > File > "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", > line 121, in run_action > provider_action() > File > "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", > line 238, in action_run > tries=self.resource.tries, try_sleep=self.resource.try_sleep) > File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", > line 70, in inner > result = function(command, **kwargs) > File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", > line 92, in checked_call > tries=tries, try_sleep=try_sleep) > File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", > line 140, in _call_wrapper > result = _call(command, **kwargs_copy) > File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", > line 291, in _call > raise Fail(err_msg) > resource_management.core.exceptions.Fail: Execution of 'source > /usr/hdp/current/kafka-broker/config/kafka-env.sh; > /usr/hdp/current/kafka-broker/bin/kafka stop' returned 1. Stopping Kafka > [23359] /usr/hdp/current/kafka-broker/bin/kafka: line 110: > /var/log/kafka/kafka.out: Permission denied > failed. > {code} > > The problem is likely due to custom service user being used for Kafka > > > Diffs > ----- > > ambari-common/src/main/python/resource_management/core/resources/system.py > 83abc64 > > ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py > a8bd9d5 > > ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka_broker.py > 6fcf08a > ambari-server/src/test/python/stacks/2.2/KAFKA/test_kafka_broker.py 72cb050 > > Diff: https://reviews.apache.org/r/41328/diff/ > > > Testing > ------- > > mvn clean test + check on live cluster > > > Thanks, > > Dmitro Lisnichenko > >
