airbnb / smartstack-cookbook

The chef recipes for running and testing Airbnb's SmartStack
MIT License
245 stars 45 forks source link

Allow writing to the `.tmp` file used by latest versions of Synapse #22

Open ianbamforth opened 6 years ago

ianbamforth commented 6 years ago

There's been a change in Synapse code write new haproxy config to a temporary file in the same directory, but the cookbook only sets up write permissions on the original config file - it also needs write access to the directory to create the tmp file.

See https://github.com/airbnb/synapse/commit/45da178f13e3a0f9b5ab1a9498d3c1522a84a134 for the first breaking change, that code has been modified since to just use .tmp as a suffix.

Symptom: Errno::EACCES: Permission denied @ rb_sysopen - /etc/haproxy/haproxy.cfg.tmp /opt/smartstack/synapse/src/lib/synapse/config_generator/haproxy.rb:1323:inwrite'`