-
-
Notifications
You must be signed in to change notification settings - Fork 6
Add ZOOCFGDIR env variable to ZooKeeper to make scripts work #1298
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
base: main
Are you sure you want to change the base?
Conversation
| ENV PATH="${PATH}":/stackable/zookeeper/bin | ||
| # This is used by zkEnv.sh and for the shell scripts in bin/ | ||
| # If unset it tries to find the conf directory automatically and that fails | ||
| ENV ZOOCFGDIR=/stackable/config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, we have a rwconfig as well for the real config https://github.com/stackabletech/zookeeper-operator/blob/e370101dfe986e862c0354f6a50471b857d0c078/rust/operator-binary/src/zk_controller.rs#L927.
Its created by the operator though...maybe this should be set in the operator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this to be honest. Is /stackable/config the wrong directory then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We basically use the config mounted in /stackable/config, copy that to /stackable/rwconfig to replace/extend the myid etc. A quick glance does not show anything else https://github.com/stackabletech/zookeeper-operator/blob/main/rust/operator-binary/src/command.rs#L3. We do more in other operators.
Thats why the tests probably work fine, just wanted to say that the config file stored in /stackable/config is not the one zookeeper runs with, see https://github.com/stackabletech/zookeeper-operator/blob/e370101dfe986e862c0354f6a50471b857d0c078/rust/operator-binary/src/zk_controller.rs#L955.
And the rwconfig is an empty dir created by the operator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, if that is the case then this PR is wrong. So....is /stackable/rwconfig the correct directory then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but i still would prefer to just set it in the operator.
However, we could point in the docker image to the "default" zookeeper config in the binary folder and overwrite to /stackable/rwconfig in the operator? Then the image is a bit more "standalone".
Description
This works around https://issues.apache.org/jira/browse/ZOOKEEPER-4985
If we don't set this variable most of the shell scripts will fail (definitely zkCleanup.sh).
It can be set manually before every call but we do know the location of the config directory so no harm in making it a bit easier.
I didn't think this needed a changelog entry, happy to add if you think otherwise.
Definition of Done Checklist