upgrading from 11.10.4 ee to 11.11.0 ee gives error under Running handlers: "There was an error running gitlab-ctl reconfigure"
Summary
On Ubuntu Server 18.04, upgrading from 11.10.4ee on self-hosted instance to 11.11.0ee gives the following error.
Steps to reproduce
On an instance running 11.10.4ee, use apt update / apt dist-upgrade to upgrade gitlab to 11.11.0ee
After "Upgrade complete!" message, the post-install script gives the following issues/errors in green and red:
* execute[/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys check-permissions] action run
[green] - execute /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys check-permissions
* storage_directory[/var/opt/gitlab/git-data/repositories] action create
* ruby_block[directory resource: /var/opt/gitlab/git-data/repositories] action run
================================================================================
[red] Error executing action `run` on resource 'ruby_block[directory resource: /var/opt/gitlab/git-data/repositories]'
==============================================================================
================================================================================
[red] Error executing action `create` on resource 'storage_directory[/var/opt/gitlab/git-data/repositories]'
================================================================================
and then under "Running handlers:, all in red:
There was an error running gitlab-ctl reconfigure:
storage_directory[/var/opt/gitlab/git-data/repositories] (gitlab::gitlab-rails line 55) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /var/opt/gitlab/git-data/repositories] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 33) had an error: Mixlib::ShellOut::ShellCommandFailed: Failed asserting that mode permissions on "/var/opt/gitlab/git-data/repositories" is 2770
---- Begin output of set -x && [ "$(stat --printf='%04a' $(readlink -f /var/opt/gitlab/git-data/repositories) | grep -o '....$')" = '2770' ] ----
STDOUT:
STDERR: + grep -o ....$
+ readlink -f /var/opt/gitlab/git-data/repositories
+ stat --printf=%04a /var/opt/gitlab/git-data/repositories
+ [ 0770 = 2770 ]
---- End output of set -x && [ "$(stat --printf='%04a' $(readlink -f /var/opt/gitlab/git-data/repositories) | grep -o '....$')" = '2770' ] ----
Ran set -x && [ "$(stat --printf='%04a' $(readlink -f /var/opt/gitlab/git-data/repositories) | grep -o '....$')" = '2770' ] returned 1
then:
Running handlers complete Chef Client failed. 1 resources updated in 06 seconds shell prompt #
Expected behavior is that upgrading process will provide no errors.
Edited by Stan Hu