Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete Kafka topic results in crash #27624

Closed
michael-misiaszek opened this issue Jul 1, 2024 · 2 comments
Closed

Delete Kafka topic results in crash #27624

michael-misiaszek opened this issue Jul 1, 2024 · 2 comments
Assignees
Labels
kafka solved tech-issues The user has a technical issue about an application

Comments

@michael-misiaszek
Copy link

michael-misiaszek commented Jul 1, 2024

Name and Version

bitnami/kafka

What architecture are you using?

None

What steps will reproduce the bug?

Load kafka via helm chart, create a topic with Kafka UI, delete topic with Kakfa UI or kafka-topic.sh

What is the expected behavior?

Kafka topic gets deleted

What do you see instead?

Kafka crashes immediately with:

 "Failed atomic move of /bitnami/kafka/data/test-0 -> _/bitnami/kafka/data/test-0._some-numbers_-delete

Further down you get:

Error while renaming dir for test-0 in log dir /bitnami/kafka/data
...
java.nio.file.AccessDeniedException: /bitnami/kafka/data/test-0 -> /bitnami/kafka/data/test-0.9d271740a25e45aba27820dbfe632ce6-delete

Additional information

Things I've tried in my kafka-values.yml file (collapsed for ez reading), NOTE: I've tried numerous configurations of the settings below:

  • Different storage types (i.e. azure-csi, azure-csi-premium & our storage-with-sa-account)
  • controller.podSecurityContext.enabled: false
  • controller.containerSecurityContext.enabled: false
  • controller.containerSecurityContext.readOnlyRootFilesystem: false
  • controller.containerSecurityContext.runAsNonRoot: false
  • broker.containerSecurityContext.readOnlyRootFilesystem: false
  • extraConfig: |-
    delete.topic.enable = true
    logDirs=/opt/bitnami/kafka/logs
@michael-misiaszek michael-misiaszek added the tech-issues The user has a technical issue about an application label Jul 1, 2024
@github-actions github-actions bot added the triage Triage is needed label Jul 1, 2024
@carrodher carrodher transferred this issue from bitnami/containers Jul 2, 2024
@github-actions github-actions bot removed the triage Triage is needed label Jul 2, 2024
@github-actions github-actions bot assigned andresbono and unassigned javsalgar and carrodher Jul 2, 2024
@michael-misiaszek
Copy link
Author

michael-misiaszek commented Jul 2, 2024

I have found that the owner of /bitnami/kafka/data is root. Even though I use:
helm uninstall kafka

AND delete the persistent volume claim (ensuring the volume get's removed too)

Assuming the user/group is suppose to be 1001
I created another namespace and installed kafka to that and noticed that it created the user/group 1001. Maybe, I need to do more to remove Kafka in its entirety?

I don't have much customization, however, here is what I'm using:

controller:
  containerSecurityContext:
    readOnlyRootFilesystem: false
  resources:
    requests:
      cpu: 200m
      memory: 512Mi
    limits:
      cpu: 750m
      memory: 3072Mi
listeners:
  client:
    containerPort: 9092
    protocol: PLAINTEXT
    name: CLIENT

@michael-misiaszek
Copy link
Author

michael-misiaszek commented Jul 3, 2024

RESOLVED

Come to find out that Azure storage class provisioner Azure File (CSI) does not play nice with Kafka. I ended up using the following:

Azure Storage Class: Azure Disk (CSI)

Any of these provisioners will probably work, however, we used managed-csi-premium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kafka solved tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

4 participants