evertrue / zookeeper-cookbook

Chef cookbook for installing and managing Zookeeper.
https://supermarket.chef.io/cookbooks/zookeeper
Apache License 2.0
81 stars 117 forks source link

Fix environment #177

Closed ljesmin closed 8 years ago

ljesmin commented 8 years ago

This PR solved three issues for me:

  1. zookeeper-env.sh was could not be written as path was faulty (contained %{zookeeper_version})
  2. exports_config was evaluated with value "true"
  3. with sysv style startup /etc/default/zookeeper was executed but now passed to subshells as variables were not exported. Exported some variables.
jeffbyrnes commented 8 years ago

@ljesmin thanks for your contribution! The catch to use lazy evaluation for the two fault properties is a great fix.

However, if ZK is executed in a subshell via SysV, all of the env vars should probably be exported, right? In either case, rather than add two additional lines to the end, I’d ask you please just export the vars at their initial assignment.

jeffbyrnes commented 8 years ago

I went ahead & rebased this to fix it up against recent code changes, and merged it in. We’ll see what Travis has to say!