-
Notifications
You must be signed in to change notification settings - Fork 205
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
lint task breaks, command line works #253
Comments
A link to the code in question would be helpful. |
Yeah so turned out my previous comment about the difference of the command line run versus the rake run was bogus, I wasn't disabling a check that the rake task was disabling. I can show you the last file it checks before blowing up if that helps? |
Sure. |
It's not exactly pretty but here you go: class zookeeper (
$zookeeper_cluster_nodes = hiera('zookeeper_cluster_nodes'),
$zookeeper_cluster_size = hiera('zookeeper_cluster_size'),
$zookeeper_heap_size = hiera('zookeeper_heap_size'),
) {
user { 'zookeeper':
require => Package['zookeeper'],
comment => 'Zookeeper Node',
shell => '/bin/false',
home => '/var/lib/zookeeper',
system => true,
ensure => present,
managehome => true;
}
File { owner => 'root', group => 'root', mode => '0755' }
file {
'/etc/zookeeper/zoo.cfg':
content => template('zookeeper/zoo.cfg.erb'),
require => Package['zookeeper'],
notify => Service['zookeeper'];
}
file {
["/srv/data/zookeeper","/srv/log/zookeeper"]:
require => User['zookeeper'],
owner => 'zookeeper',
group => 'zookeeper',
mode => 700,
ensure => directory;
}
file { 'myid':
path => "/srv/data/zookeeper/myid",
content => template('zookeeper/myid.erb'),
mode => 644,
require => File["/srv/data/zookeeper"],
}
file { 'default_zookeeper':
path => "/etc/default/zookeeper",
source => 'puppet:///modules/zookeeper/default_zookeeper',
mode => 644,
require => [Package['zookeeper'],
File["/srv/data/zookeeper"]],
}
file { '/etc/logrotate.d/zookeeper':
owner => 'root',
group => 'root',
mode => 0644,
source => 'puppet:///modules/zookeeper/zookeeper-logrotate',
}
file { 'init_zookeeper':
path => "/etc/init.d/zookeeper",
source => 'puppet:///modules/zookeeper/init_zookeeper',
mode => 755,
require => [Package['zookeeper'],
File["/srv/data/zookeeper"]],
}
file { 'env_zookeeper':
path => "/etc/zookeeper/zookeeper-env.sh",
source => 'puppet:///modules/zookeeper/zookeeper-env.sh',
mode => 644,
require => [Package['zookeeper'],
File["/srv/data/zookeeper"]],
}
package {
'zookeeper':
require => Class['java'],
ensure => present;
}
service { 'zookeeper':
require => [Package['zookeeper'],
File["/srv/data/zookeeper"],
File["/srv/log/zookeeper"]],
hasstatus => true,
enable => true,
ensure => running;
}
class { 'zookeeper::icinga::services':
zookeeper_cluster_nodes => $zookeeper_cluster_nodes,
zookeeper_cluster_size => $zookeeper_cluster_size,
zookeeper_heap_size => $zookeeper_heap_size,
}
} |
I was not able to reproduce with Puppet-lint 0.3.2 |
Our repo right now is one big repo with a require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
EXCLUDED_MODULES = ['acl', 'apt', 'concat_native', 'ntp', 'rabbitmq',
'rvm', 'stdlib', 'templatewlv'].collect { |a| "modules/#{a}" }
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.ignore_paths = EXCLUDED_MODULES.collect { |a| "#{a}/**/*.pp"}
|
Not sure, though it is not an issue with puppet-lint. Can you please close? Recommend you look at https://github.com/bodepd/librarian-puppet-simple. It would simplify your setup and give you per module control instead of this global Rakefile. |
I'm not going to redesign my setup right now just for this. Thanks though. |
I'm reopening this. I had a look at the traceback and the line of code it explodes on is in fail if linter.errors? || (
linter.warnings? && PuppetLint.configuration.fail_on_warnings
) |
At least, that's the line the |
What I'm getting at is, I understand now why the rake aborted pops up but perhaps there would be a more user friendly way to handle this than trigger a Runtime error? |
It looks like |
I'm currently running into an issue where
puppet-lint .
works correctly whereas when I callrake lint
it blows up at the end.Oddly enough it seems to reach the end of its run, the last file which it prints before blowing up is also the last file the command line checks.
Anyone got a clue?
The text was updated successfully, but these errors were encountered: