Created
May 29, 2012 00:55
-
-
Save garthk/2821948 to your computer and use it in GitHub Desktop.
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find parent resource type 'mongodb::package::params' of type hostclass in production at /etc/puppet/modules/mongodb/manifests/package.pp:1 on node X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/puppet/modules/mongodb/manifests/init.pp | |
class mongodb { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/puppet/modules/mongodb/manifests/package.pp | |
class mongodb::package ( | |
$package = $mongodb::package::params::package, | |
$repository = $mongodb::package::params::repository, | |
$repokey = $mongodb::package::params::repokey | |
) inherits mongodb::package::params { | |
exec { 'mongodb repository key': | |
path => "/bin:/usr/bin", | |
unless => "apt-key list | grep '${repokey}'", | |
command => "apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${repokey}", | |
} | |
file { 'mongodb repository source': | |
ensure => present, | |
path => "/etc/apt/sources.list.d/10gen.list", | |
content => "${repository}\n", | |
} | |
exec { 'mongodb repository update': | |
command => "/usr/bin/apt-get update", | |
require => [Exec['mongodb repository source'], File['mongodb repository key']], | |
creates => "/var/lib/apt/lists/downloads-distro.mongodb.org_repo_ubuntu-upstart_dists_dist_10gen_binary-${architecture}_Packages", | |
timeout => 3600, | |
} | |
package { $package: | |
ensure => installed, | |
require => Exec["apt-get update"], | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/puppet/modules/mongodb/manifests/package/params.pp | |
class mongodb::package::params { | |
$repository = "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | |
$package = "mongodb-10gen" | |
$repokey = "7F0CEB10 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find /etc/puppet/modules/mongodb/ | grep -v .git | xargs ls -lad | |
drwxr-xr-x 6 root root 4096 2012-05-27 23:20 /etc/puppet/modules/mongodb/ | |
-rw-r--r-- 1 root root 195 2012-05-27 23:20 /etc/puppet/modules/mongodb/Makefile | |
drwxr-xr-x 4 root root 4096 2012-05-28 20:49 /etc/puppet/modules/mongodb/manifests | |
drwxr-xr-x 2 root root 4096 2012-05-28 20:14 /etc/puppet/modules/mongodb/manifests/conf | |
-rw-r--r-- 1 root root 427 2012-05-28 20:09 /etc/puppet/modules/mongodb/manifests/conf/params.pp | |
-rw-r--r-- 1 root root 1835 2012-05-28 19:57 /etc/puppet/modules/mongodb/manifests/conf.pp | |
-rw-r--r-- 1 root root 18 2012-05-28 20:13 /etc/puppet/modules/mongodb/manifests/init.pp | |
drwxr-xr-x 2 root root 4096 2012-05-28 20:49 /etc/puppet/modules/mongodb/manifests/package | |
-rw-r--r-- 1 root root 237 2012-05-28 20:09 /etc/puppet/modules/mongodb/manifests/package/params.pp | |
-rw-r--r-- 1 root root 995 2012-05-28 20:10 /etc/puppet/modules/mongodb/manifests/package.pp | |
-rw-r--r-- 1 root root 204 2012-05-28 20:03 /etc/puppet/modules/mongodb/manifests/server.pp | |
-rw-r--r-- 1 root root 42 2012-05-27 23:20 /etc/puppet/modules/mongodb/Modulefile | |
-rw-r--r-- 1 root root 4739 2012-05-28 19:56 /etc/puppet/modules/mongodb/README.md | |
drwxr-xr-x 2 root root 4096 2012-05-27 23:20 /etc/puppet/modules/mongodb/templates | |
-rw-r--r-- 1 root root 789 2012-05-27 23:20 /etc/puppet/modules/mongodb/templates/etc-init-mongodb.conf.erb | |
-rw-r--r-- 1 root root 1027 2012-05-27 23:20 /etc/puppet/modules/mongodb/templates/etc-mongodb.conf.erb | |
drwxr-xr-x 3 root root 4096 2012-05-27 23:20 /etc/puppet/modules/mongodb/tests | |
-rw-r--r-- 1 root root 253 2012-05-27 23:20 /etc/puppet/modules/mongodb/tests/conf.pp | |
-rw-r--r-- 1 root root 16 2012-05-27 23:20 /etc/puppet/modules/mongodb/tests/init.pp | |
drwxr-xr-x 2 root root 4096 2012-05-27 23:20 /etc/puppet/modules/mongodb/tests/modules | |
lrwxrwxrwx 1 root root 5 2012-05-27 23:20 /etc/puppet/modules/mongodb/tests/modules/mongodb -> ../.. | |
-rw-r--r-- 1 root root 1141 2012-05-27 23:20 /etc/puppet/modules/mongodb/tests/vagrant.pp | |
-rw-r--r-- 1 root root 459 2012-05-27 23:20 /etc/puppet/modules/mongodb/Vagrantfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/puppet/puppet.conf on client | |
[main] | |
server = puppet.example.com | |
logdir = /var/log/puppet | |
vardir = /var/lib/puppet | |
ssldir = /var/lib/puppet/ssl | |
rundir = /var/run/puppet | |
factpath = $vardir/lib/facter | |
pluginsync = true | |
templatedir = $confdir/templates | |
prerun_command = /etc/puppet/etckeeper-commit-pre | |
postrun_command = /etc/puppet/etckeeper-commit-post | |
[agent] | |
report = true | |
environment = production |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/puppet/puppet.conf on server | |
[main] | |
server = puppet.example.com | |
logdir = /var/log/puppet | |
vardir = /var/lib/puppet | |
ssldir = /var/lib/puppet/ssl | |
rundir = /var/run/puppet | |
factpath = $vardir/lib/facter | |
pluginsync = true | |
templatedir = $confdir/templates | |
prerun_command = /etc/puppet/etckeeper-commit-pre | |
postrun_command = /etc/puppet/etckeeper-commit-post | |
[agent] | |
report = true | |
environment = production |
Found the error after dropping to puppetmasterd --debug --verbose --no-daemonize
on the suggestion of the IRC channel:
debug: importing '/etc/puppet/modules/mongodb/manifests/package/params.pp' in environment production
err: Unclosed quote after '' in '7F0CEB10
}
' at /etc/puppet/modules/mongodb/manifests/package/params.pp:6 on node puppet.example.com
err: Unclosed quote after '' in '7F0CEB10
}
' at /etc/puppet/modules/mongodb/manifests/package/params.pp:6 on node puppet.example.com
The problem wasn't picked up by puppet parser validate
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm foxed: why is Puppet complaining that it
Could not find parent resource type 'mongodb::package::params' of type hostclass in production
?