Hello,
i just updated our omnibus install from 10.2.4 to 10.3.2 on ubuntu 14.04 and the Gitlab-ctl reconfigure failed leading to error 500.
I managed to make it succed by commenting the lines about backups :
gitlab_rails['backup_path'] = "/media/comp/DATAS/backups"
gitlab_rails['backup_archive_permissions'] = 0644
gitlab_rails['backup_keep_time'] = 259200
But i’d rather keep it like this in order to have my backup working as usual.
This is the output of the reconfigure if this can help :
sudo gitlab-ctl reconfigure
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- gitlab (0.0.1)
- package (0.1.0)
- registry (0.1.0)
- mattermost (0.1.0)
- consul (0.0.0)
- gitaly (0.1.0)
- runit (0.14.2)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create (up to date)
Converging 408 resources
* directory[/etc/gitlab] action create (up to date)
* directory[Create /var/opt/gitlab] action create (up to date)
* directory[/opt/gitlab/embedded/etc] action create (up to date)
* template[/opt/gitlab/embedded/etc/gitconfig] action create (up to date)
Recipe: gitlab::web-server
* account[Webserver user and group] action create
* group[Webserver user and group] action create (up to date)
* user[Webserver user and group] action create (up to date)
(up to date)
Recipe: gitlab::users
* directory[/var/opt/gitlab] action create (up to date)
* account[GitLab user and group] action create
* group[GitLab user and group] action create (up to date)
* user[GitLab user and group] action create (up to date)
(up to date)
* template[/var/opt/gitlab/.gitconfig] action create (up to date)
Recipe: gitlab::gitlab-shell
* storage_directory[/var/opt/gitlab/git-data] action create
* ruby_block[directory resource: /var/opt/gitlab/git-data] action run (skipped due to not_if)
(up to date)
* storage_directory[/var/opt/gitlab/git-data/repositories] action create
* ruby_block[directory resource: /var/opt/gitlab/git-data/repositories] action run (skipped due to not_if)
(up to date)
* storage_directory[/var/opt/gitlab/.ssh] action create
* ruby_block[directory resource: /var/opt/gitlab/.ssh] action run (skipped due to not_if)
(up to date)
* directory[/var/log/gitlab/gitlab-shell/] action create (up to date)
* directory[/var/opt/gitlab/gitlab-shell] action create (up to date)
* templatesymlink[Create a config.yml and create a symlink to Rails root] action create
* template[/var/opt/gitlab/gitlab-shell/config.yml] action create (up to date)
* link[Link /opt/gitlab/embedded/service/gitlab-shell/config.yml to /var/opt/gitlab/gitlab-shell/config.yml] action create (up to date)
(up to date)
* link[/opt/gitlab/embedded/service/gitlab-shell/.gitlab_shell_secret] action create (up to date)
* execute[/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys check-permissions] action run
- execute /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys check-permissions
* bash[Set proper security context on ssh files for selinux] action run (skipped due to only_if)
Recipe: gitlab::gitlab-rails
* directory[/var/log/gitlab] action create (up to date)
* storage_directory[/var/opt/gitlab/gitlab-rails/shared] action create
* ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared] action run (skipped due to not_if)
(up to date)
* storage_directory[/var/opt/gitlab/gitlab-rails/shared/artifacts] action create
* ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/artifacts] action run (skipped due to not_if)
(up to date)
* storage_directory[/var/opt/gitlab/gitlab-rails/shared/lfs-objects] action create
* ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/lfs-objects] action run (skipped due to not_if)
(up to date)
* storage_directory[/var/opt/gitlab/gitlab-rails/uploads] action create
* ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/uploads] action run (skipped due to not_if)
(up to date)
* storage_directory[/var/opt/gitlab/gitlab-ci/builds] action create
* ruby_block[directory resource: /var/opt/gitlab/gitlab-ci/builds] action run (skipped due to not_if)
(up to date)
* storage_directory[/var/opt/gitlab/gitlab-rails/shared/pages] action create
* ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/pages] action run (skipped due to not_if)
(up to date)
* directory[create /var/opt/gitlab/gitlab-rails/etc] action create (up to date)
* directory[create /opt/gitlab/etc/gitlab-rails] action create (up to date)
* directory[create /var/opt/gitlab/gitlab-rails/working] action create (up to date)
* directory[create /var/opt/gitlab/gitlab-rails/tmp] action create (up to date)
* directory[create /var/opt/gitlab/gitlab-rails/upgrade-status] action create (up to date)
* directory[create /var/log/gitlab/gitlab-rails] action create (up to date)
* storage_directory[/media/comp/DATAS/backups] action create
* ruby_block[directory resource: /media/comp/DATAS/backups] action run
================================================================================
Error executing action `run` on resource 'ruby_block[directory resource: /media/comp/DATAS/backups]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of stat --printf='%U' $(readlink -f /media/comp/DATAS/backups) ----
STDOUT:
STDERR: stat: opérande manquant
Saisissez « stat --help » pour plus d'informations.
---- End output of stat --printf='%U' $(readlink -f /media/comp/DATAS/backups) ----
Ran stat --printf='%U' $(readlink -f /media/comp/DATAS/backups) returned 1
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/storage_directory_helper.rb:35:in `run_command'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/storage_directory_helper.rb:67:in `get_owner'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/storage_directory_helper.rb:48:in `ensure_permissions_set'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb:39:in `block (3 levels) in class_from_file'
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb
33: ruby_block "directory resource: #{path}" do
34: block do
35: # Ensure the directory exists
36: storage_helper.ensure_directory_exists(path)
37:
38: # Ensure the permissions are set
39: storage_helper.ensure_permissions_set(path)
40:
41: # Error out if we have not achieved the target permissions
42: storage_helper.validate!(path)
43: end
44: not_if { storage_helper.validate(path) }
45: end
46: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb:33:in `block in class_from_file'
ruby_block("directory resource: /media/comp/DATAS/backups") do
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :default
block_name "directory resource: /media/comp/DATAS/backups"
declared_type :ruby_block
cookbook_name "gitlab"
block #<Proc:0x0000000003b74d48@/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb:34>
not_if { #code block }
end
Platform:
---------
x86_64-linux
================================================================================
Error executing action `create` on resource 'storage_directory[/media/comp/DATAS/backups]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
ruby_block[directory resource: /media/comp/DATAS/backups] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 33) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of stat --printf='%U' $(readlink -f /media/comp/DATAS/backups) ----
STDOUT:
STDERR: stat: opérande manquant
Saisissez « stat --help » pour plus d'informations.
---- End output of stat --printf='%U' $(readlink -f /media/comp/DATAS/backups) ----
Ran stat --printf='%U' $(readlink -f /media/comp/DATAS/backups) returned 1
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/storage_directory_helper.rb:35:in `run_command'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/storage_directory_helper.rb:67:in `get_owner'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/storage_directory_helper.rb:48:in `ensure_permissions_set'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb:39:in `block (3 levels) in class_from_file'
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/gitlab-rails.rb
95: storage_directory node['gitlab']['gitlab-rails']['backup_path'] do
96: owner gitlab_user
97: mode '0700'
98: only_if { node['gitlab']['gitlab-rails']['manage_backup_path'] }
99: end
100:
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/gitlab-rails.rb:95:in `from_file'
storage_directory("/media/comp/DATAS/backups") do
action [:create]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :storage_directory
cookbook_name "gitlab"
recipe_name "gitlab-rails"
owner "git"
mode "0700"
path "/media/comp/DATAS/backups"
only_if { #code block }
end
Platform:
---------
x86_64-linux
Running handlers:
There was an error running gitlab-ctl reconfigure:
storage_directory[/media/comp/DATAS/backups] (gitlab::gitlab-rails line 95) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /media/comp/DATAS/backups] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 33) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of stat --printf='%U' $(readlink -f /media/comp/DATAS/backups) ----
STDOUT:
STDERR: stat: opérande manquant
Saisissez « stat --help » pour plus d'informations.
---- End output of stat --printf='%U' $(readlink -f /media/comp/DATAS/backups) ----
Ran stat --printf='%U' $(readlink -f /media/comp/DATAS/backups) returned 1
Running handlers complete
Chef Client failed. 1 resources updated in 04 seconds
The backups folder is set to 0777 for the sake of the test.
Any idea what’s going on ? It’s the first time an update failed like that in almost 2 years.
Thanks