Error executing action `run` on resource 'execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp]'
Hi, I'm at first attempt to install gitlab on a server. I'm using CentOS 7 x86_64.
First of all I've discovered that SELinux has to be enabled or in permissive mode to install it, in fact I've tried the first time with SELinux disabled and it broke badly.
Now I'm trying with SELinux in permissive mode, but this is what happens:
[root@vs1 ~]# gitlab-ctl reconfigure
Starting Chef Client, version 11.12.2
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create (up to date)
[2014-10-21T18:59:29+02:00] WARN: Cloning resource attributes for directory[/var/opt/gitlab] from prior resource (CHEF-3694)
[2014-10-21T18:59:29+02:00] WARN: Previous directory[/var/opt/gitlab]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:40:in `from_file'
[2014-10-21T18:59:29+02:00] WARN: Current directory[/var/opt/gitlab]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/users.rb:23:in `from_file'
[2014-10-21T18:59:29+02:00] WARN: Cloning resource attributes for directory[/var/opt/gitlab/gitlab-rails/etc] from prior resource (CHEF-3694)
[2014-10-21T18:59:29+02:00] WARN: Previous directory[/var/opt/gitlab/gitlab-rails/etc]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/gitlab-rails.rb:37:in `block in from_file'
[2014-10-21T18:59:29+02:00] WARN: Current directory[/var/opt/gitlab/gitlab-rails/etc]: /opt/gitlab/embedded/cookbooks/gitlab/definitions/unicorn_config.rb:21:in `block in from_file'
[2014-10-21T18:59:29+02:00] WARN: Cloning resource attributes for service[unicorn] from prior resource (CHEF-3694)
[2014-10-21T18:59:29+02:00] WARN: Previous service[unicorn]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:60:in `block in from_file'
[2014-10-21T18:59:29+02:00] WARN: Current service[unicorn]: /opt/gitlab/embedded/cookbooks/runit/definitions/runit_service.rb:191:in `block in from_file'
[2014-10-21T18:59:29+02:00] WARN: Cloning resource attributes for service[sidekiq] from prior resource (CHEF-3694)
[2014-10-21T18:59:29+02:00] WARN: Previous service[sidekiq]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:60:in `block in from_file'
[2014-10-21T18:59:29+02:00] WARN: Current service[sidekiq]: /opt/gitlab/embedded/cookbooks/runit/definitions/runit_service.rb:191:in `block in from_file'
Converging 160 resources
* directory[/etc/gitlab] action nothing (skipped due to action :nothing)
* directory[/var/opt/gitlab] action create (up to date)
Recipe: gitlab::users
* directory[/var/opt/gitlab] action create (up to date)
* group[git] action create (up to date)
* user[git] action create (up to date)
* template[/var/opt/gitlab/.gitconfig] action create (up to date)
Recipe: gitlab::web-server
* group[gitlab-www] action create (up to date)
* user[gitlab-www] action create (up to date)
Recipe: gitlab::gitlab-shell
* directory[/var/opt/gitlab/git-data/repositories] action create (up to date)
* directory[/var/opt/gitlab/.ssh] action create (up to date)
* file[/var/opt/gitlab/.ssh/authorized_keys] action create (up to date)
* file[/opt/gitlab/embedded/service/gitlab-shell/authorized_keys.lock] action create (up to date)
* execute[chcon --recursive --type ssh_home_t /var/opt/gitlab/.ssh] action run
- execute chcon --recursive --type ssh_home_t /var/opt/gitlab/.ssh
* directory[/var/log/gitlab/gitlab-shell/] action create (up to date)
* directory[/var/opt/gitlab/gitlab-shell] action create (up to date)
* directory[/var/opt/gitlab/git-data] action create (up to date)
* template[/var/opt/gitlab/gitlab-shell/config.yml] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-shell/config.yml] action create (up to date)
Recipe: gitlab::gitlab-rails
* directory[/var/opt/gitlab/gitlab-rails/etc] action create (up to date)
* directory[/var/opt/gitlab/gitlab-rails/etc/env] action create (up to date)
* directory[/var/opt/gitlab/gitlab-rails/working] action create (up to date)
* directory[/var/opt/gitlab/gitlab-rails/tmp] action create (up to date)
* directory[/var/opt/gitlab/backups] action create (up to date)
* directory[/var/log/gitlab/gitlab-rails] action create (up to date)
* directory[/var/opt/gitlab/gitlab-rails] action create (up to date)
* directory[/var/opt/gitlab/gitlab-rails/uploads] action create (up to date)
* template[/var/opt/gitlab/gitlab-rails/etc/secret] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/.secret] action create (up to date)
* template[/var/opt/gitlab/gitlab-rails/etc/database.yml] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/config/database.yml] action create (up to date)
* template[/var/opt/gitlab/gitlab-rails/etc/resque.yml] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/config/resque.yml] action create (up to date)
* template[/var/opt/gitlab/gitlab-rails/etc/aws.yml] action delete (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/config/aws.yml] action delete (up to date)
* template[/var/opt/gitlab/gitlab-rails/etc/smtp_settings.rb] action delete (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/config/initializers/smtp_settings.rb] action delete (up to date)
* template[/var/opt/gitlab/gitlab-rails/etc/gitlab.yml] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml] action create (up to date)
* template[/var/opt/gitlab/gitlab-rails/etc/rack_attack.rb] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/config/initializers/rack_attack.rb] action create (up to date)
* directory[/var/opt/gitlab/git-data/gitlab-satellites] action create (up to date)
* file[/var/opt/gitlab/gitlab-rails/etc/env/HOME] action create (up to date)
* file[/var/opt/gitlab/gitlab-rails/etc/env/BUNDLE_GEMFILE] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/tmp] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/public/uploads] action create (up to date)
* link[/opt/gitlab/embedded/service/gitlab-rails/log] action create (up to date)
* link[/var/log/gitlab/gitlab-rails/sidekiq.log] action create (up to date)
* file[/opt/gitlab/embedded/service/gitlab-rails/db/schema.rb] action create (up to date)
* remote_file[/var/opt/gitlab/gitlab-rails/VERSION] action create (up to date)
* execute[chown -R root:root /opt/gitlab/embedded/service/gitlab-rails/public] action run
- execute chown -R root:root /opt/gitlab/embedded/service/gitlab-rails/public
* execute[clear the gitlab-rails cache] action nothing (skipped due to action :nothing)
Recipe: gitlab::selinux
* execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp] action run
================================================================================
Error executing action `run` on resource 'execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received ''
---- Begin output of semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp ----
STDOUT:
STDERR:
---- End output of semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp ----
Ran semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp returned
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/gitlab/recipes/selinux.rb
20: execute "semodule -i /opt/gitlab/embedded/selinux/rhel/7/#{ssh_keygen_module}.pp" do
21: not_if "semodule -l | grep '^#{ssh_keygen_module}\\s'"
22: end
23: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/gitlab/recipes/selinux.rb:20:in `from_file'
execute("semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp") do
action "run"
retries 0
retry_delay 2
guard_interpreter :default
command "semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp"
backup 5
returns 0
cookbook_name :gitlab
recipe_name "selinux"
not_if "semodule -l | grep '^gitlab-7.2.0-ssh-keygen\s'"
end
Running handlers:
[2014-10-21T18:59:43+02:00] ERROR: Running exception handlers
Running handlers complete
[2014-10-21T18:59:43+02:00] ERROR: Exception handlers complete
[2014-10-21T18:59:43+02:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 2 resources updated in 15.279685303 seconds
[2014-10-21T18:59:43+02:00] ERROR: execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp] (gitlab::selinux line 20) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ''
---- Begin output of semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp ----
STDOUT:
STDERR:
---- End output of semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp ----
Ran semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp returned
[2014-10-21T18:59:43+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)