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

Ordering problem when installing passenger #57

Open
rsyring opened this issue Nov 24, 2012 · 1 comment
Open

Ordering problem when installing passenger #57

rsyring opened this issue Nov 24, 2012 · 1 comment

Comments

@rsyring
Copy link

rsyring commented Nov 24, 2012

Thanks for your efforts with this module, its been very helpful so far. I have ran into an issue I wanted to report. When using the following in a node:

include rvm
rvm_system_ruby {
    'ruby-1.9.3-p327':
        ensure => 'present',
        default_use => true;
    'ruby-1.8.7-p370':
        ensure => 'present',
        default_use => false;
}
class {
    'rvm::passenger::apache':
        version => '3.0.18',
        ruby_version => 'ruby-1.8.7-p370',
        mininstances => '3',
        maxpoolsize => '30',
}

The first run on the node results in errors:

Error: Could not update: Execution of '/usr/local/rvm/bin/rvm ruby-1.8.7-p370 do gem install -v 3.0.18 --include-dependencies --no-rdoc --no-ri passenger' returned 1: Ruby ruby-1.8.7-p370 is not installed.

Error: /Stage[main]/Rvm::Passenger::Gem/Rvm_gem[passenger]/ensure: change from absent to 3.0.18 failed: Could not update: Execution of '/usr/local/rvm/bin/rvm ruby-1.8.7-p370 do gem install -v 3.0.18 --include-dependencies --no-rdoc --no-ri passenger' returned 1: Ruby ruby-1.8.7-p370 is not installed.

/Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/Exec[passenger-install-apache2-module]: Dependency Rvm_gem[passenger] has failures: true
Warning: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/Exec[passenger-install-apache2-module]: Skipping because of failed dependencies
/Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-available/passenger.conf]: Dependency Rvm_gem[passenger] has failures: true
Warning: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-available/passenger.conf]: Skipping because of failed dependencies
/Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-enabled/passenger.conf]: Dependency Rvm_gem[passenger] has failures: true
Warning: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-enabled/passenger.conf]: Skipping because of failed dependencies
/Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-available/passenger.load]: Dependency Rvm_gem[passenger] has failures: true
Warning: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-available/passenger.load]: Skipping because of failed dependencies
/Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-enabled/passenger.load]: Dependency Rvm_gem[passenger] has failures: true
Warning: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-enabled/passenger.load]: Skipping because of failed dependencies

I tried adding a Require:

class {
    'rvm::passenger::apache':
        version => '3.0.18',
        ruby_version => 'ruby-1.8.7-p370',
        mininstances => '3',
        maxpoolsize => '30',
        require => Rvm_system_ruby['ruby-1.8.7-p370'];
}

But that didn't seem to help.

The second time I run the agent on the node, passenger installs just fine.

I resolved this by modifying rvm::passenger::gem:

class rvm::passenger::gem($ruby_version, $version) {
  rvm_gem {
    "passenger":
      ensure       => $version,
      ruby_version => $ruby_version,
      require      => Rvm_system_ruby[$ruby_version]; # <-- added this line
  }
}

To require the system ruby. I then did a rm -rf /usr/local/rvm and ran the agent again, this time without error.

@TJM
Copy link

TJM commented Feb 17, 2013

This looks like it might be a good resolution to my problem too...

http://stackoverflow.com/questions/14908384/puppet-ordering-passenger-install-before-ruby-install

I tried several different ways to get the ruby install to run before the passenger install, but hadn't yet tried modifying the RVM module itself.

This is already fixed in a pull request: #60

Thanks!

Tommy

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

2 participants