Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Fixes kafka stateful set configuration for proper directory entry in … #2951

Closed

Conversation

aedeph
Copy link

@aedeph aedeph commented Sep 17, 2018

…overrides section in run server

Motivation: according to trunc code (which describes in quite a vague fashion in official documentation) log.dir section of configuration is used as a topic log directory if and only if log.dirs is not present. However, default /opt/kafka_2.11-0.10.2.0/config/server.properties from current gcr.io/google-samples/k8skafka contains entry of log.dirs=/tmp/kafka-logs, so override does nothing useful and in fact is very misleading, producing probable data loss, when mounting external volume to /var/lib/kafka.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 17, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aedeph
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: kow3ns

If they are not already assigned, you can assign the PR to them by writing /assign @kow3ns in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@aedeph
Copy link
Author

aedeph commented Sep 17, 2018

/assign @kow3ns

@tehlers320
Copy link

Once you do this it will complain about lost+found if your on ext file systems

@@ -74,7 +74,7 @@ spec:
- "exec kafka-server-start.sh /opt/kafka/config/server.properties --override broker.id=${HOSTNAME##*-} \
--override listeners=PLAINTEXT://:9093 \
--override zookeeper.connect=zk-0.zk-svc.default.svc.cluster.local:2181,zk-1.zk-svc.default.svc.cluster.local:2181,zk-2.zk-svc.default.svc.cluster.local:2181 \
--override log.dir=/var/lib/kafka \
--override log.dirs=/var/lib/kafka \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be changed to /var/lib/kafka/data or something different than the base mount in the example here: https://github.com/kubernetes/contrib/blob/master/statefulsets/kafka/kafka.yaml#L168

this is to avoid the lost+found complaints from kafka.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are probably right, but I guess, that it is more about permissions managing on external volume and pod itself, rather than getting the only proper directory path value in start configuration. Besides, I consider the whole yaml as a template, and complaint is quite straightforward to proper understanding of the issue and exact solution to it.

My PR is more about misleading key, which did mislead me to lose actual data.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 24, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 23, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants