I am trying to do a fresh installation of gitlab-ee-11.9.1-ee using the Omnibus package on an up-to-date CentOS 7 virtual machine but it is failing when attempting to change the /var/opt/gitlab/.ssh directory it created. Selinux is enabled but in permissive mode and /opt is its own volume using the XFS file system with adequate storage space available. Re-running ‘gitlab-ctl reconfigure’ results in the same error. Any advice would be appreciated.
Error Message:
================================================================================
Error executing action `create` on resource 'storage_directory[/var/opt/gitlab/.ssh]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
ruby_block[directory resource: /var/opt/gitlab/.ssh] (/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 chgrp git /var/opt/gitlab/.ssh ----
STDOUT:
STDERR: chgrp: invalid group: ‘git’
---- End output of chgrp git /var/opt/gitlab/.ssh ----
Ran chgrp git /var/opt/gitlab/.ssh returned 1
The complete installation output:
Starting Chef Client, version 13.6.4
resolving cookbooks for run list: ["gitlab-ee"]
Synchronizing Cookbooks:
- gitlab-ee (0.0.1)
- package (0.1.0)
- gitlab (0.0.1)
- consul (0.1.0)
- repmgr (0.1.0)
- runit (4.3.0)
- postgresql (0.1.0)
- redis (0.1.0)
- registry (0.1.0)
- mattermost (0.1.0)
- gitaly (0.1.0)
- letsencrypt (0.1.0)
- nginx (0.1.0)
- acme (3.1.0)
- crond (0.1.0)
- compat_resource (12.19.1)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create
- change mode from '0755' to '0775'
- restore selinux security context
Converging 272 resources
* directory[/etc/gitlab] action create (up to date)
* directory[Create /var/opt/gitlab] action create
- create new directory /var/opt/gitlab
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/embedded/etc] action create
- create new directory /opt/gitlab/embedded/etc
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/embedded/etc/gitconfig] action create
- create new file /opt/gitlab/embedded/etc/gitconfig
- update content in file /opt/gitlab/embedded/etc/gitconfig from none to [REMOVED]
--- /opt/gitlab/embedded/etc/gitconfig 2019-03-28 16:27:05.044981688 +0000
+++ /opt/gitlab/embedded/etc/.chef-gitconfig20190328-16932-bfnl2c 2019-03-28 16:27:05.044981688 +0000
@@ -1 +1,12 @@
+[pack]
+ threads = 1
+[receive]
+ fsckObjects = true
+advertisePushOptions = true
+[repack]
+ writeBitmaps = true
+[transfer]
+ hideRefs=^refs/tmp/
+hideRefs=^refs/keep-around/
+hideRefs=^refs/remotes/
- change mode from '' to '0755'
- restore selinux security context
Recipe: gitlab::web-server
* account[Webserver user and group] action create
* group[Webserver user and group] action create
- create group gitlab-www
* linux_user[Webserver user and group] action create
- create user gitlab-www
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
- create group git
* linux_user[GitLab user and group] action create
- create user git
* template[/var/opt/gitlab/.gitconfig] action create
- create new file /var/opt/gitlab/.gitconfig
- update content in file /var/opt/gitlab/.gitconfig from none to [REMOVED]
--- /var/opt/gitlab/.gitconfig 2019-03-28 16:27:05.560984406 +0000
+++ /var/opt/gitlab/.chef-.gitconfig20190328-16932-8ndcr0.gitconfig 2019-03-28 16:27:05.559984401 +0000
@@ -1 +1,12 @@
+# This file is managed by gitlab-ctl. Manual changes will be
+# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
+# and run `sudo gitlab-ctl reconfigure`.
+
+[user]
+ name = GitLab
+ email = [REMOVED]
+[core]
+ autocrlf = input
+[gc]
+ auto = 0
- change mode from '' to '0644'
- change owner from '' to 'git'
- change group from '' to 'git'
- restore selinux security context
* directory[/var/opt/gitlab/.bundle] action create
- create new directory /var/opt/gitlab/.bundle
- change owner from '' to 'git'
- change group from '' to 'git'
- restore selinux security context
Recipe: gitlab::gitlab-shell
* storage_directory[/var/opt/gitlab/.ssh] action create
* ruby_block[directory resource: /var/opt/gitlab/.ssh] action run
================================================================================
Error executing action `run` on resource 'ruby_block[directory resource: /var/opt/gitlab/.ssh]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of chgrp git /var/opt/gitlab/.ssh ----
STDOUT:
STDERR: chgrp: invalid group: ‘git’
---- End output of chgrp git /var/opt/gitlab/.ssh ----
Ran chgrp git /var/opt/gitlab/.ssh 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:60: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: #{new_resource.path}" do
34: block do
35: # Ensure the directory exists
36: storage_helper.ensure_directory_exists(new_resource.path)
37:
38: # Ensure the permissions are set
39: storage_helper.ensure_permissions_set(new_resource.path)
40:
41: # Error out if we have not achieved the target permissions
42: storage_helper.validate!(new_resource.path)
43: end
44: not_if { storage_helper.validate(new_resource.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: /var/opt/gitlab/.ssh") do
action [:run]
default_guard_interpreter :default
block_name "directory resource: /var/opt/gitlab/.ssh"
declared_type :ruby_block
cookbook_name "gitlab"
block #<Proc:0x00000000041b78b8@/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb:34>
not_if { #code block }
end
System Info:
------------
chef_version=13.6.4
platform=centos
platform_version=7.6.1810
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
================================================================================
Error executing action `create` on resource 'storage_directory[/var/opt/gitlab/.ssh]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
ruby_block[directory resource: /var/opt/gitlab/.ssh] (/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 chgrp git /var/opt/gitlab/.ssh ----
STDOUT:
STDERR: chgrp: invalid group: ‘git’
---- End output of chgrp git /var/opt/gitlab/.ssh ----
Ran chgrp git /var/opt/gitlab/.ssh 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:60: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-shell.rb
38: storage_directory dir do
39: owner git_user
40: group git_group
41: mode "0700"
42: end
43: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/gitlab-shell.rb:38:in `block in from_file'
storage_directory("/var/opt/gitlab/.ssh") do
action [:create]
default_guard_interpreter :default
declared_type :storage_directory
cookbook_name "gitlab"
recipe_name "gitlab-shell"
owner "git"
group "git"
mode "0700"
path "/var/opt/gitlab/.ssh"
end
System Info:
------------
chef_version=13.6.4
platform=centos
platform_version=7.6.1810
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
Running handlers:
There was an error running gitlab-ctl reconfigure:
storage_directory[/var/opt/gitlab/.ssh] (gitlab::gitlab-shell line 38) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /var/opt/gitlab/.ssh] (/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 chgrp git /var/opt/gitlab/.ssh ----
STDOUT:
STDERR: chgrp: invalid group: ‘git’
---- End output of chgrp git /var/opt/gitlab/.ssh ----
Ran chgrp git /var/opt/gitlab/.ssh returned 1
Running handlers complete
Chef Client failed. 12 resources updated in 11 seconds
warning: %posttrans(gitlab-ee-11.9.1-ee.0.el7.x86_64) scriptlet failed, exit status 1
Non-fatal POSTTRANS scriptlet failure in rpm package gitlab-ee-11.9.1-ee.0.el7.x86_64
Verifying : gitlab-ee-11.9.1-ee.0.el7.x86_64 1/1
Installed:
gitlab-ee.x86_64 0:11.9.1-ee.0.el7