intercity / chef-repo

Set up your server to host Ruby on Rails apps. - Follow us on Twitter: @intercityup
MIT License
417 stars 84 forks source link

Parent directory /etc/postgresql/9.3/main does not exist. #173

Open cvandermeer opened 9 years ago

cvandermeer commented 9 years ago

I have succesfully made a node for a server and got it up and running. I made a second server and node with the same configurations(but diffrent pc) but now i get this error

cvandermeer commented 9 years ago

still having this problem

berkes commented 8 years ago

Can confirm. Upstream has it too https://github.com/hw-cookbooks/postgresql/issues/261

berkes commented 8 years ago

So, I looked into this more. Upstream has a fix, but that is not merged, nor is it a very sturdy fix.

Problem is that posgres (and maybe some other repo's too) work different depending on the LC_ALL you have set.

IMO, the root user should not set LC* env-vars and leave it to the server to set these. The problem is that this is a client-side configurations. Many debian- and even OSX- variations pass their LC* ENV vars along over SSH. See the ubuntu wiki for some examples.

Askubuntu has some answers too.

My suggestion would be to either:

  1. disable all passing of LC_* in sshd-config. This way, no user will have language-issues. This goes against the default Ubuntu (and probably other distro's) defaults, though.
  2. disable AcceptEnv for the root user in the sshd-config on the server. I am not sure if this will work for all servers and if this is well-supported.
  3. document that chef solo has to be ran with a -F. That way we can define a sane default config. I am not confident that this work for all clients. And I would expect this to open new issues, seeing that the clients-setups are very different and fast changing.

I'll work out a quick PR for 2. or 1 if 2 does not work.

chrisduong commented 8 years ago

Hi guys,

If we move this code execute 'Set locale and Create cluster' before the line - include_recipe 'postgresql::server_conf' in the 'postgresql::server_debian', it would create the folder and it won't fail.

It is a simple fix.