Skip to content

Invalid parameter false(false) - possible re-introduction of previous error from puppet 2.6 #21

Closed
MiiR opened this Issue Oct 11, 2011 · 12 comments

7 participants

@MiiR
MiiR commented Oct 11, 2011

Running rvm_gem on puppet 2.7.5 causes the following error -

err: Could not create resource file /var/lib/puppet/state/resources.txt: Invalid parameter false(false) at /etc/puppet/modules/rvm/manifests/classes/passenger-gem.pp:6

When the same puppet scripts are run on 2.7.3 we get no errors.

Commenting out all reference to rvm_gem removes the error in 2.7.5 (but obviously doesn't install our gems!).

I believe the bug #13 - Resource type rvm_gem does not support parameter false has been reintroduced with the latest puppet release.

@blt04
Owner
blt04 commented Oct 11, 2011

I'm unable to reproduce this with Puppet 2.7.5. Could you post your config?

@MiiR
MiiR commented Oct 12, 2011

How much do you need? The parts I seem to have issues with are -

class {
'rvm::passenger::apache':
version => '3.0.9',
ruby_version => 'ruby-1.9.2-p290',
mininstances => '3',
maxinstancesperapp => '0',
maxpoolsize => '10',
spawnmethod => 'conservative';
}

class {
  'rvm::passenger::gem':
    ruby_version => $ruby_version,
    version => $version,
}  

class rvm::passenger::apache(
$ruby_version,
$version,
$rvm_prefix = '/usr/local/',
$mininstances = '1',
$maxpoolsize = '10',
$poolidletime = '300',
$maxinstancesperapp = '0',
$spawnmethod = 'conservative'
) {

case $operatingsystem {
  Ubuntu: { include rvm::passenger::apache::ubuntu::pre }
}

class {
  'rvm::passenger::gem':
    ruby_version => $ruby_version,
    version => $version,
}

# TODO: How can we get the gempath automatically using the ruby version
# Can we read the output of a command into a variable?
# e.g. $gempath = `usr/local/rvm/bin/rvm ${ruby_version} exec rvm gemdir`
$gempath = "${rvm_prefix}rvm/gems/${ruby_version}/gems"
$binpath = "${rvm_prefix}rvm/bin/"

case $operatingsystem {
  Ubuntu: { include rvm::passenger::apache::ubuntu::post }
}

class rvm::passenger::gem($ruby_version, $version) {
rvm_gem {
"passenger":
ruby_version => $ruby_version,
ensure => $version,
}
}

rvm_gem {
'ruby-1.9.2-p290/bundler':
ensure => '1.0.18',
require => Rvm_system_ruby['ruby-1.9.2-p290'];
}

Something like that anyway.

I just realized the puppetmaster was still running 2.7.3 which may have affected things.

@MiiR MiiR closed this Oct 12, 2011
@MiiR MiiR reopened this Oct 12, 2011
@MiiR
MiiR commented Oct 12, 2011

oops, wrong button.

@blt04
Owner
blt04 commented Oct 12, 2011

Most of what you pasted is the RVM module's code. You do not need to copy that into your own manifest files. Try using this in one of your manifest files:

include rvm::system

if $rvm_installed == "true" {
  rvm_system_ruby {
    'ruby-1.9.2-p180':
      ensure => 'present',
      default_use => true;
  }

  class {
    'rvm::passenger::apache':
      version => '3.0.7',
      ruby_version => 'ruby-1.9.2-p180',
      mininstances => '3',
      maxinstancesperapp => '0',
      maxpoolsize => '30',
      spawnmethod => 'smart-lv2';
  }
}
@mtylty
mtylty commented Oct 12, 2011

I've been experiencing the same problem (puppet 2.7.5).

I've been using the following code:

# manifests/templates.pp
class ruby($version) {
  include rvm::system

  if $rvm_installed == "true" {
    rvm_system_ruby { $version:
        ensure => 'present',
        default_use => true
    }

    rvm_gem { 'bundler':
        name => 'bundler',
        ruby_version => $version,
        ensure => latest,
        require => Rvm_system_ruby[$version]
    }
    rvm_gem { 'puppet':
        name => 'puppet',
        ruby_version => $version,
        ensure => latest,
        require => Rvm_system_ruby[$version]
    }
  }
}

class passenger($version, $ruby_version, $mininstances ='3', $maxinstancesperapp ='0', $maxpoolsize='30', $spawnmethod='smart-lv2') {
  include apache_common # includes common apache configuration

  class { ruby: version => $ruby_version }

  if $rvm_installed == "true" {
    class { 'rvm::passenger::apache':
        version => $version,
        ruby_version => $ruby_version,
        mininstances => $mininstances,
        maxinstancesperapp => $maxinstancesperapp,
        maxpoolsize => $maxpoolsize,
        spawnmethod => $spawnmethod
    }
  }
}
###

# manifests/nodes.pp (inside a node definition)

class { passenger:
    version => '3.0.9',
    ruby_version => 'ree-1.8.7-2011.03'
}

@omarqureshi

I get this on 2.7.4

@mattmcmanus

Same problem here with 2.7.5

$ruby_version = 'ruby-1.9.2-p290'

if $rvm_installed == "true" {
  rvm_system_ruby {
    $ruby_version:
      ensure => 'present',
      default_use => true;
  }

rvm_gemset {
  "${ruby_version}@dotherapy":
    ensure => present,
    require => Rvm_system_ruby[$ruby_version];
}

rvm_gem {
  "${ruby_version}@dotherapy/bundler":
    ensure => latest,
    require => Rvm_gemset["${ruby_version}@dotherapy"];
}

class {
  'rvm::passenger::apache':
    version => '3.0.7',
    ruby_version => $ruby_version,
    mininstances => '1',
    maxinstancesperapp => '0',
    maxpoolsize => '5',
    spawnmethod => 'smart-lv2';
  }
}
@blt04
Owner
blt04 commented Oct 16, 2011

I've confirmed this error. It appears to be caused by new functionality added in Puppet 2.7.4. I've filed an upstream bug here: #10109.

In the meantime, this error doesn't appear to prevent gems from being installed.

@MiiR
MiiR commented Oct 18, 2011

Looks like its still there on 2.7.6~rc2

The only issue I really have with it is that on puppet-dashboard all my app servers show as failed!

@heffergm

Getting this in the released 2.7.6 build as well.

@joehillen

Looks like it will be fixed in 2.7.10

puppetlabs/puppet@45f0855

@blt04 blt04 added a commit that referenced this issue Jan 22, 2012
@blt04 Add note about false errors in 2.7.4 through 2.7.9
References #21.
6cd36b1
@blt04
Owner
blt04 commented Jan 30, 2012

2.7.10 was released a few days ago and appears to have fixed this issue.

@blt04 blt04 closed this Jan 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.