CentOS 6.5: sysctl issue
We're trying to get GitLab running on CentOS 6.5 running on an OpenVZ VPS. When running gitlab-ctl reconfigure, I got:
* execute[sysctl] action run ================================================================================ Error executing action `run` on resource 'execute[sysctl]' ================================================================================ Mixlib::ShellOut::ShellCommandFailed ------------------------------------ Expected process to exit with , but received '255' ---- Begin output of /sbin/sysctl -p /etc/sysctl.conf ---- STDOUT: net.ipv4.ip_forward = 0 net.ipv4.tcp_syncookies = 1 kernel.shmmax = 17179869184 kernel.shmall = 4194304 STDERR: error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key error: "net.bridge.bridge-nf-call-iptables" is an unknown key error: "net.bridge.bridge-nf-call-arptables" is an unknown key ---- End output of /sbin/sysctl -p /etc/sysctl.conf ---- Ran /sbin/sysctl -p /etc/sysctl.conf returned 255
Based on http://serverfault.com/questions/477718/sysctl-p-etc-sysctl-conf-returns-error, I've modified
/opt/gitlab/embedded/cookbooks/gitlab/recipes/postgresql.rb around line 77 to have
# hope this works... execute "sysctl" do command "/sbin/sysctl -e -p /etc/sysctl.conf" action :nothing end
(Notice the added switch for sysctl.)
After doing this, reconfigure run fine. Could you please check whether this is correct?
So supplying -e to the sysctl command fixed the problem for you? Since -e is a switch to ignore errors it would make sense to use it in openVZ which shares kernel settings and a lot of them are unreachable within the container. Did enabling the module help at all?
Since ignoring errors is not the best move if you are running a bare metal server because it can create unintended behaviour, I've added a section under the troubleshooting related to this problem, you can see it here.
Yes, supplying -e fixed the issue. Thanks for adding this info to the docs.
Status changed to closedToggle commit list
Doesn't look similar to me, the error is completely different.