I’m runnung ubuntu 12.04 and 14.04
I’ve mounted the windows share on /mnt/git-data
I’ve addded this to the /etc/fstab
//windows-share/git-data /mnt/git-data cifs uid=git,gid=git,credentials=.cifscre,iocharset=utf8,sec=ntlm 0 0
And changed the /etc/gitlab/gitlab.rb 's git_data_dir to /mnt/git-data
and ran the sudo gitlab-ctl reconfigure but gives this error
Looks like the git user does not have permission to change the directory’s chmod
However the repositoty directory is created inside the /mnt/git-data directory
Could someone help on the configuration?
Error executing action `create` on resource 'directory[/mnt/git-data]'
================================================================================
Errno::EACCES
-------------
Permission denied @ chmod_internal - /mnt/git-data
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/gitlab-shell.rb
66: directory dir do
67: owner git_user
68: mode "0700"
69: recursive true
70: end
71: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/gitlab-shell.rb:66:in `block in from_file'
directory("/mnt/git-data") do
action :create
retries 0
retry_delay 2
default_guard_interpreter :default
path "/mnt/git-data"
recursive true
declared_type :directory
cookbook_name "gitlab"
recipe_name "gitlab-shell"
owner "git"
mode "0700"
end
Running handlers:
[2015-08-12T15:25:59+09:00] ERROR: Running exception handlers
Running handlers complete
[2015-08-12T15:25:59+09:00] ERROR: Exception handlers complete
[2015-08-12T15:25:59+09:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 1 resources updated in 6.230443889 seconds
[2015-08-12T15:25:59+09:00] ERROR: directory[/mnt/git-data] (gitlab::gitlab-shell line 66) had an error: Errno::EACCES: Permission denied @ chmod_internal - /mnt/git-data
[2015-08-12T15:26:00+09:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Similar issue for me for both CIFS and NFS. In my case, I’m attempting to use the gitlab/gitlab-ce:latest
docker image. The docker host machine mounts a share on the NAS which is used to persist any container data. But something about the mounted folders prevents certain chown operations for working as ruby expects.
With NFS I get:
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
Errno::EPERM
------------
directory[/etc/gitlab] (gitlab::default line 26) had an error: Errno::EPERM: Operation not permitted @ chown_internal - /etc/gitlab
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:31:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:
24: ENV['PATH'] = "#{install_dir}/bin:#{install_dir}/embedded/bin:#{ENV['PATH']}"
25:
26: directory "/etc/gitlab" do
27: owner "root"
28: group "root"
29: mode "0775"
30: action :nothing
31>> end.run_action(:create)
With CIFS I get:
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
Errno::EACCES
-------------
directory[/etc/gitlab] (gitlab::default line 26) had an error: Errno::EACCES: Permission denied @ chown_internal - /etc/gitlab
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:31:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:
24: ENV['PATH'] = "#{install_dir}/bin:#{install_dir}/embedded/bin:#{ENV['PATH']}"
25:
26: directory "/etc/gitlab" do
27: owner "root"
28: group "root"
29: mode "0775"
30: action :nothing
31>> end.run_action(:create)
Of several applications, GitLab is the only one that has an issue with this setup. I may just allow the data to be persisted in a folder structure directly on the host machine, but I’m very much not fond of that, since it means a separate mechanism running on the host to back up the data to the NAS.