puppet-gitlab icon indicating copy to clipboard operation
puppet-gitlab copied to clipboard

First Installation fails because of an Notification Message while `gem install charlock_holmes`.

Open tobiashochguertel opened this issue 10 years ago • 10 comments

It's not really a big problem, but for the perfection it would be nice to get this fixed. I installed gitlab on an empty server with Ubuntu 14.04, and the puppet agent run fails because of the output of "This could take a while..." - I think the exit code 1 with this message has to be catched and handeled to further run.

I done this installation from the console promp manually and restarted the puppet agent run. Things went nice.

Notice: /Stage[main]/Profiles::Scm_service_git/Exec[initial update]/returns: executed successfully
Error: Execution of '/home/git/.rbenv/versions/2.1.2/bin/gem install --no-rdoc --no-ri -v0.6.9.4 charlock_holmes' returned 1: Building native extensions.  This could take a while...
Error: /Stage[main]/Gitlab::Setup/Rbenv::Gem[charlock_holmes]/Rbenvgem[git/2.1.2/charlock_holmes/0.6.9.4]/ensure: change from absent to 0.6.9.4 failed: Execution of '/home/git/.rbenv/versions/2.1.2/bin/gem install --no-rdoc --no-ri -v0.6.9.4 charlock_holmes' returned 1: Building native extensions.  This could take a while...
Notice: /Stage[main]/Gitlab::Package/Vcsrepo[/home/git/gitlab]: Dependency Rbenvgem[git/2.1.2/charlock_holmes/0.6.9.4] has failures: true
....

I hope this Helps.

tobiashochguertel avatar Mar 26 '15 06:03 tobiashochguertel

seems working fine now (with rbenv) https://paste.debian.net/plainh/16dd7871 (just tested in #223 ) Thanks!

sbadia avatar Jul 11 '15 17:07 sbadia

I'm having the same issue on centos 7 with the version 1.0.0 of this module.

gcmalloc avatar Jul 11 '15 21:07 gcmalloc

Ok, run a second time, everything worked fine. I suspect a dependency issue. Will look into it

gcmalloc avatar Jul 11 '15 21:07 gcmalloc

oh! thanks @gcmalloc for the quick feedback! I re-open the issue then, I take a look with beaker on centos then.

sbadia avatar Jul 12 '15 08:07 sbadia

Same issue here with first installation, little bit more details:

err Execution of '/home/git/.rbenv/versions/2.1.6/bin/gem install --no-rdoc --no-ri -v0.6.9.4 charlock_holmes' returned 1: Building native extensions. This could take a while...   Puppet          2015-07-15 05:18 UTC
err Could not find command 'bundle' /Stage[main]/Gitlab::Install/Exec[install gitlab]   /etc/puppetlabs/puppet/environments/ci/modules/gitlab/manifests/install.pp  105 2015-07-15 05:18 UTC
err change from absent to 0.6.9.4 failed: Execution of '/home/git/.rbenv/versions/2.1.6/bin/gem install --no-rdoc --no-ri -v0.6.9.4 charlock_holmes' returned 1: Building native extensions. This could take a while... /Stage[main]/Gitlab::Setup/Rbenv::Gem[charlock_holmes]/Rbenvgem[git/2.1.6/charlock_holmes/0.6.9.4]/ensure   /etc/puppetlabs/puppet/environments/ci/modules/rbenv/manifests/gem.pp   30  2015-07-15 05:18 UTC
err Failed to call refresh: Could not find command 'bundle' /Stage[main]/Gitlab::Install/Exec[install gitlab]   /etc/puppetlabs/puppet/environments/ci/modules/gitlab/manifests/install.pp  105 2015-07-15 05:18 UTC
err ruby /home/git/gitlab-shell/bin/install returned 1 instead of one of [0]    /Stage[main]/Gitlab::Install/Exec[install gitlab-shell] /etc/puppetlabs/puppet/environments/ci/modules/gitlab/manifests/install.pp  35  2015-07-15 05:18 UTC
err Failed to call refresh: ruby /home/git/gitlab-shell/bin/install returned 1 instead of one of [0]    /Stage[main]/Gitlab::Install/Exec[install gitlab-shell]

It looks like Could not find command 'bundle' causing this problem. I'll continue investigation, probably caused by incomplete deployment of rbenv package?

sergef avatar Jul 15 '15 05:07 sergef

Here's the gist with debug info: https://gist.github.com/sergef/4e5f8b3da79fb2def0e4 File error-when-running-as-sudo.log is actually /home/git/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0-static/charlock_holmes-0.6.9.4/gem_make.out Last line is showing the issue Permission denied @ dir_chdir - /home/sudouser... somehow it's trying to return to home dir of the user running puppet agent from sudo session (could be sudo environment issue or build issue?).

I've tried clean deployment running puppet agent as a service - and charlock_holmes installed without problems. But some errors still there:

err Could not evaluate: Could not find command 'bundle' /Stage[main]/Gitlab::Install/Exec[install gitlab]   /etc/puppetlabs/puppet/environments/ci/modules/gitlab/manifests/install.pp  105 2015-07-15 06:49 UTC
err Could not find command 'bundle' /Stage[main]/Gitlab::Install/Exec[install gitlab]   /etc/puppetlabs/puppet/environments/ci/modules/gitlab/manifests/install.pp  105 2015-07-15 06:49 UTC
err Failed to call refresh: Could not find command 'bundle' /Stage[main]/Gitlab::Install/Exec[install gitlab]

tbc...

sergef avatar Jul 15 '15 06:07 sergef

To followup here, I was able to install gitlab at once from 0.

  • with gitlab_manage_rbenv => false option, and jdowning/rbenv which installed all of the required gems, plugins and ruby 2.1.6:
    class { 'rbenv': } ->
    rbenv::plugin { 'sstephenson/ruby-build': } ->
    rbenv::build { $ruby_version:
        global => true
    } ->
    rbenv::gem { 'bigdecimal':
        version      => '1.2.4',
        ruby_version => $ruby_version,
        skip_docs    => true,
        timeout      => 0
    } ->
    rbenv::gem { 'charlock_holmes':
        version      => '0.6.9.4',
        ruby_version => $ruby_version,
        skip_docs    => true,
        timeout      => 0
    } ->
    rbenv::gem { 'io-console':
        version      => '0.4.3',
        ruby_version => $ruby_version,
        skip_docs    => true,
        timeout      => 0
    } ->
    rbenv::gem { 'json':
        version      => '1.8.1',
        ruby_version => $ruby_version,
        skip_docs    => true,
        timeout      => 0
    } ->
    rbenv::gem { 'minitest':
        version      => '4.7.5',
        ruby_version => $ruby_version,
        skip_docs    => true,
        timeout      => 0
    } ->
    rbenv::gem { 'psych':
        version      => '2.0.5',
        ruby_version => $ruby_version,
        skip_docs    => true,
        timeout      => 0
    } ->
    rbenv::gem { 'rake':
        version      => '10.1.0',
        ruby_version => $ruby_version,
        skip_docs    => true,
        timeout      => 0
    } ->
    rbenv::gem { 'rdoc':
        version      => '4.1.0',
        ruby_version => $ruby_version,
        skip_docs    => true,
        timeout      => 0
    } ->
    rbenv::gem { 'test-unit':
        version      => '2.1.6.0',
        ruby_version => $ruby_version,
        skip_docs    => true,
        timeout      => 0
    } ->
  • also removed setting up global Exec path, using an array in the main profile module, not string (https://github.com/sergef/puppet-gitlab/commit/cf7b63e9141ee588558c5d17c12224298ea22757)
    Exec {
        path => [
            '/usr/local/rbenv/shims',
            '/usr/local/rbenv/bin',
            '/usr/local/sbin',
            '/usr/local/bin',
            '/usr/sbin',
            '/usr/bin',
            '/sbin',
            '/bin'
        ]
    }

Also installation on CentOS and RedHat 7.1 required firewall and selinux modules.

sergef avatar Jul 22 '15 08:07 sergef

Hi, thanks @sergef for the debug and feedback!! About jdowning/rbenv what the changes with alup/rbenv do you think we must to change? And about Exec path, it's needed for users who have a ruby in a different path, it's really needed to revert that ? Indeed for firewall and selinux module/config, don't hesitate if you want to made a pull-request :)

sbadia avatar Jul 22 '15 08:07 sbadia

I'll try to get back to alup/rbenv to be more compatible with the main idea, used jdowning/rbenv as an experiment. I think exec paths not being set was the main issue, but i'll confirm soon.

sergef avatar Jul 22 '15 08:07 sergef

thanks! ok ack :)

sbadia avatar Jul 22 '15 08:07 sbadia