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

Breaks if ressource collector is present #301

Closed
SimonHoenscheid opened this issue Aug 19, 2014 · 4 comments · Fixed by #302
Closed

Breaks if ressource collector is present #301

SimonHoenscheid opened this issue Aug 19, 2014 · 4 comments · Fixed by #302
Milestone

Comments

@SimonHoenscheid
Copy link

Trace:

 /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/plugins/check_whitespace.rb:124:in `block (2 levels) in check': undefined method `each' for nil:NilClass (NoMethodError)
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/plugins/check_whitespace.rb:111:in `each'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/plugins/check_whitespace.rb:111:in `each_with_index'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/plugins/check_whitespace.rb:111:in `block in check'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/plugins/check_whitespace.rb:95:in `each'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/plugins/check_whitespace.rb:95:in `check'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/checkplugin.rb:21:in `run'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/checks.rb:58:in `block in run'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/checks.rb:56:in `each'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/checks.rb:56:in `run'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint.rb:168:in `run'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/bin.rb:59:in `block in run'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/bin.rb:56:in `each'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/lib/puppet-lint/bin.rb:56:in `run'
    from /var/lib/gems/1.9.1/gems/puppet-lint-1.0.0/bin/puppet-lint:7:in `<top (required)>'
    from /usr/local/bin/puppet-lint:23:in `load'
    from /usr/local/bin/puppet-lint:23:in `<main>'

puppet code example:

# this Class installs percona server
class site_example::role::role_percona {

  User::Managed <| tag == mysql |>
  class{ 'site_example::apt::percona_aptrepo': }

  class {'mysql':
    root_password                  => 'supersecurepasshere',                   ## wird abgelegt in /root/.my.cnf
    package                        => 'percona-server-server-5.6',
    service_autorestart            => false,
    #template                      => 'site_example/mysqld/example-my.cnf.erb',
    #my_class                      => 'site_example::mysqld::preinstall',
    require                        => [ User[mysql], Apt::Source['percona_aptrepo'] ],
    options                        => {
    #'innodb_log_files_in_group' => '10', ## comment
    }
  }
}
@rodjek rodjek added this to the 1.0.1 milestone Aug 19, 2014
@rodjek
Copy link
Owner

rodjek commented Aug 19, 2014

Reduced it to it's most basic case

foo { 'bar':
  a => true,
  b => {
  }
}

It's not related to the resource collector, it seems to be triggered by a resource with more than 1 parameter where one of the parameters is an empty hash.

@rodjek
Copy link
Owner

rodjek commented Aug 19, 2014

Fixed in #302. I've heard of one other bug in 1.0.0 that i'm waiting for more details on. Once that's in and fixed i'll release 1.0.1 with this fix included.

@rodjek
Copy link
Owner

rodjek commented Aug 20, 2014

1.0.1 release is out.

@SimonHoenscheid
Copy link
Author

Thank you!

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

Successfully merging a pull request may close this issue.

2 participants