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

Change location of data/log files #1764

Open
Klaus-42-root opened this issue Aug 7, 2024 · 0 comments
Open

Change location of data/log files #1764

Klaus-42-root opened this issue Aug 7, 2024 · 0 comments

Comments

@Klaus-42-root
Copy link

Klaus-42-root commented Aug 7, 2024

Issue with change the location for log files.
I assumed that it could be done with something like this in the inventory file.

kafka_controller:
  hosts:
    host1.dmz23.local:
    host2.dmz23.local:
    host3.dmz23.local:
  vars:
    kafka_controller_custom_properties:
      log.dirs: "/data/kafka/data"

kafka_controller:
  hosts:
    host4.dmz23.local:
    host5.dmz23.local:
    host6.dmz23.local:
  vars:
    kafka_broker_custom_properties:
      log.dirs: "/data/kafka/data"


But the ansible script failed when creating the kafka broker. Because it can not locate the cluster id of the controller (the meta.properties has a wrong cluster.id)

The issue are in the file "roles/kafka_broker/tasks/get_meta_properties.yml" where the variable kafka_controller_final_properties['log.dirs'] are resolved in the wrong scope.

I found a work around - by moving the kafka_controller_custom_properties up as a global variable - but that is a bit backward, and I wasted quite a bit of time find that issue. Note if the each kafka_controller have individual file locations, this workaround will never work.

Tested with version 7.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant