Closed davidsayers closed 7 years ago
@davidsayers oh my goodness, thanks for chasing that down!
@davidsayers hm. The exhibitor
cookbook doesn’t use the zookeeper_config
resource. How does this solve this?
It looked to me like the exhibitor cookbook will need to use zookeeper_config. Currently there is an issue in where java_opts are being ignored.
@davidsayers it doesn’t use zookeeper_config
on purpose; Exhibitor handles configuring ZooKeeper.
That said, you’re right; that’s tricky. Once upon a time, this & the exhibitor cookbook were tightly coupled.
@davidsayers this is tricky for me to help out with; I’m not actually using ZooKeeper at my current job. @eherot is still using it at EverTrue. Doing my best to keep contributing to this cookbook!
That said, I think that Exhibitor’s --defaultconfig
takes over the zoo.cfg
. So that covers that portion.
Perhaps the zookeeper-env.sh
file needs to be part of the zookeeper
resource, and not zookeeper_config
?
What things are you trying to configure via the JVMFLAGS
(which corresponds to the java_opts
property of zookeeper_config
)?
I'm not sure if it is the way I will go but I was testing Zookeeper authentication as described here https://www.cloudera.com/documentation/enterprise/5-6-x/topics/cdh_sg_zookeeper_security.html
This requires a JVM setting.
What about setting Exhibitor’s java.env
config value? It’s very lightly described in the Exhibitor wiki Config UI docs.
Based on what I can tell, you’d populate that config with what you want the contents of a Java environment file to contain.
So if you want that to pass along JVMFLAGS
to ZooKeeper, I think you’d do something like:
override['exhibitor']['config']['java-environment'] = "JVMFLAGS=#{your_flags}"
That is entirely guesswork, but give it a go in your wrapper cookbook!
I’ve got to get back to other things now unfortunately. I’ll ship this ownership fix though.
I did try java.env but it didn't work. Maybe I didn't spend enough time on it. Will try again.
If that ends up being the recommended approach, https://github.com/evertrue/exhibitor-cookbook/blob/master/recipes/default.rb#L25 should be removed as it is confusing.
@davidsayers good point; that is confusing. I’ll nix that, since it doesn’t have any effect anymore (it used to, long ago).
All files and directories in /opt/zookeeper are being installed as root. This updates them to use the zookeeper user.
Files being owned by root is causing the following issue in https://github.com/evertrue/exhibitor-cookbook