Can't get puppetdb work with foreman/puppet

Hi,

I'm not 100% this is the correct forum.

I have a foreman/puppet installation (done with foreman-installer) running
on ubuntu 14.
I was using it for a while already, with about 40 hosts, using the
'role/profile' approach to classify the nodes.

Which means that I have only one role per node, and the role calls
different profiles.
Many things are configured via yaml.

I want to add icinga/nagios module but I need storeconfigs for that. So, I
installed puppetdb on another host, configured the following files on the
puppet server:

routes.yaml:

··· --- master: facts: terminus: puppetdb cache: yaml

puppetdb.conf:
[main]
port = 8081
soft_write_failure = false
server = puppetdb.server

and added to puppet.conf:
storeconfigs = true
thin_storeconifgs = false
storeconfigs_backend = puppetdb

After restarting apache and running puppet agent -t I got:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Invalid relationship: Apt::Source[puppetlabs] { notify =>
Class[apt::update] }, because Class[apt::update] doesn’t seem to be in the
catalog
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Doing a ‘select * from catalogs;’ on the puppetdb database returns an empty
set.

Any ideas on what could be wrong?

thanks!

> Hi,
>
> I'm not 100% this is the correct forum.

We don't mind the occaisonal puppet question :slight_smile:

> After restarting apache and running puppet agent -t I got:
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Invalid relationship: Apt::Source[puppetlabs] { notify => Class[apt::update]
> }, because Class[apt::update] doesn't seem to be in the catalog
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
> Doing a 'select * from catalogs;' on the puppetdb database returns an empty
> set.

I don't think there's anything Foreman specific here - assuming your
nodes are getting the correct classes from the ENC, then Foreman's
involvement is pretty much done until the report is sent back at the
end of the agent run. I don't want to just ignore you, but this
feels like a purely puppet issue - have you tried asking on
puppet-users?

Cheers,

··· On 9 October 2015 at 15:38, emberlin wrote: -- Greg IRC: gwmngilfen

Hi Greg,

I'll bug them… maybe they can help :slight_smile:
thanks!
e

··· On Monday, October 12, 2015 at 2:26:23 PM UTC+2, Greg Sutcliffe wrote: > > On 9 October 2015 at 15:38, emberlin <eya...@gmail.com > > wrote: > > Hi, > > > > I'm not 100% this is the correct forum. > > We don't mind the occaisonal puppet question :) > > > After restarting apache and running puppet agent -t I got: > > Info: Retrieving pluginfacts > > Info: Retrieving plugin > > Info: Loading facts > > Error: Could not retrieve catalog from remote server: Error 400 on > SERVER: > > Invalid relationship: Apt::Source[puppetlabs] { notify => > Class[apt::update] > > }, because Class[apt::update] doesn't seem to be in the catalog > > Warning: Not using cache on failed catalog > > Error: Could not retrieve catalog; skipping run > > > > Doing a 'select * from catalogs;' on the puppetdb database returns an > empty > > set. > > I don't *think* there's anything Foreman specific here - assuming your > nodes are getting the correct classes from the ENC, then Foreman's > involvement is pretty much done until the report is sent back at the > end of the agent run. I don't want to just ignore you, but this > *feels* like a purely puppet issue - have you tried asking on > puppet-users? > > Cheers, > -- > Greg > IRC: gwmngilfen >