You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by kwmonroe <gi...@git.apache.org> on 2018/10/03 18:25:43 UTC
[GitHub] bigtop pull request #400: Add Juju storage support to Kafka charm.
Github user kwmonroe commented on a diff in the pull request:
https://github.com/apache/bigtop/pull/400#discussion_r222415839
--- Diff: bigtop-packages/src/charm/kafka/layer-kafka/reactive/kafka.py ---
@@ -38,9 +40,10 @@ def configure_kafka(zk):
hookenv.status_set('maintenance', 'setting up kafka')
data_changed( # Prime data changed for network interface
'kafka.network_interface', hookenv.config().get('network_interface'))
+ log_dir = unitdata.kv().get('kafka.storage.log_dir')
--- End diff --
Let's add another `data_changed('kafka.storage.log_dir', log_dir)` here. This `configure_kafka` method is the primary way that kafka gets installed -- after that, we constantly check data_changed in `configure_kafka_zookeepers` to trigger a reinstall.
If we *don't* do a `data_changed` with `log_dir` here, we'll get installed and started, and then immediately reinstall on the first execution of `configure_kafka_zookeepers`, because the check for `data_changed('kafka.storage.log_dir', log_dir)` in that method will be new (and hence, True).
---