Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tobiashochguertel opened this issue Mar 26, 2015 · 10 comments

Comments

@tobiashochguertel
Copy link
Contributor

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.

@sbadia
Copy link
Owner

sbadia commented Jul 11, 2015

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

@sbadia sbadia closed this as completed Jul 11, 2015
@gcmalloc
Copy link
Contributor

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

@gcmalloc
Copy link
Contributor

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

@sbadia
Copy link
Owner

sbadia commented Jul 12, 2015

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

@sbadia sbadia reopened this Jul 12, 2015
@sergef
Copy link

sergef commented Jul 15, 2015

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
Copy link

sergef commented Jul 15, 2015

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 added a commit to sergef/puppet-gitlab that referenced this issue Jul 15, 2015
@sergef
Copy link

sergef commented Jul 22, 2015

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 (sergef@cf7b63e)
    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.

@sbadia
Copy link
Owner

sbadia commented Jul 22, 2015

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 :)

@sergef
Copy link

sergef commented Jul 22, 2015

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.

@sbadia
Copy link
Owner

sbadia commented Jul 22, 2015

thanks! ok ack :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants