Importing puppet classes

Howdy,

I installed foreman and its Postgres database on 1 instance, with Puppet master on instance 2 [PuppetDB with Postgres on machine 3].

The smart proxy is installed on Puppetmaster and I can see the environments through http://smartproxy:8443/puppet/environments.

Smart-proxy was successfully configured for "Features: Puppet CA and Puppet."

The task Puppet classes --> Import from puppetmaster alerts that "No changes to your environments has been detected."

The Puppet classes table is empty.

Any tips on where I might look?

Thank you,
Eugene

Hi Eugene,

> Howdy,
>
> I installed foreman and its Postgres database on 1 instance, with Puppet
> master on instance 2 [PuppetDB with Postgres on machine 3].
>
> The smart proxy is installed on Puppetmaster and I can see the
> environments through http://smartproxy:8443/puppet/environments.
>
> Smart-proxy was successfully configured for "Features: Puppet CA and
> Puppet."
>
> The task Puppet classes --> Import from puppetmaster alerts that "No
> changes to your environments has been detected."
>
> The Puppet classes table is empty.
>
> Any tips on where I might look?

You can do a similar HTTP query to get the list of classes back, which
would be good to check:

curl http://smartproxy:8443/puppet/environments/production/classes

(assuming production is the environment name)

Which version of Foreman and Puppet? Check the mail I just sent in
response to Erno - quite a few people have hit that bug, it might be
affecting you too.

··· On 23/01/13 21:01, Eugene Vilensky wrote:


Dominic Cleal
Red Hat Engineering

Dominic,

> Hi Eugene,
>
> You can do a similar HTTP query to get the list of classes back, which
> would be good to check:
>
> curl http://smartproxy:8443/puppet/environments/production/classes
>
> (assuming production is the environment name)
>
> Which version of Foreman and Puppet? Check the mail I just sent in
> response to Erno - quite a few people have hit that bug, it might be
> affecting you too.
>
>
Foreman 1.1 RC4 via RPM on Red Hat 6. Puppet master 2.7.18.

Strangely, my 'production' environment doesn't come back:

curl http://puppetmaster.example.com:8443/puppet/environments
["development","testing","datacenter_production"]

Though I use it for quite a few clients. Those three environments which do
come back, are empty:

curl
http://puppetmaster.example.com:8443/puppet/environments/testing/classes
[]

Thanks kindly,
Eugene

··· On Wed, Jan 23, 2013 at 4:14 PM, Dominic Cleal wrote:

>>
>> Hi Eugene,
>>
>> You can do a similar HTTP query to get the list of classes back, which
>> would be good to check:
>>
>> curl http://smartproxy:8443/puppet/environments/production/classes
>>
>> (assuming production is the environment name)
>>
>> Which version of Foreman and Puppet? Check the mail I just sent in
>> response to Erno - quite a few people have hit that bug, it might be
>> affecting you too.
>
>
> Foreman 1.1 RC4 via RPM on Red Hat 6. Puppet master 2.7.18.
>
> Strangely, my 'production' environment doesn't come back:
>
> curl http://puppetmaster.example.com:8443/puppet/environments
> ["development","testing","datacenter_production"]
>
> Though I use it for quite a few clients. Those three environments which do come back, are empty:
>
> curl http://puppetmaster.example.com:8443/puppet/environments/testing/classes
> []

Howdy again,

Well, turns out I was missing a [production] section in puppet.conf. Adding one results in

>> curl http://puppetmaster.example.com:8443/puppet/environments
>
> ["development","testing","datacenter_production","production"]
>
>> curl http://puppetmaster.example.com:8443/puppet/environments/production
>
> {"paths":["$confdir/modules"],"name":"production"}
>
>> curl http://puppetmaster.example.com:8443/puppet/environments/production/classes
> []

In this doc[1], the modulepath is an absolute path with no variables, might that be what's wrong with my puppet.conf?

[1]External Nodes - Foreman

Thanks,
Eugene

··· On Jan 24, 2013, at 8:50 AM, Eugene Vilensky wrote: >> On Wed, Jan 23, 2013 at 4:14 PM, Dominic Cleal wrote:

It might be, we had a few small bugs around this. You mention the
Foreman release, but can you check the foreman-proxy RPM version?

The RC numbers aren't synchronised, so 1.1RC3 of the proxy corresponds
to 1.1RC5 of Foreman. That proxy release contained a fix[1] for
$confdir interpolation, which will probably fix your issue.

[1]http://projects.theforeman.org/wiki/smart-proxy/Release_Notes

··· On 31/01/13 16:29, Eugene Vilensky wrote: > > On Jan 24, 2013, at 8:50 AM, Eugene Vilensky wrote: > >>> >>> On Wed, Jan 23, 2013 at 4:14 PM, Dominic Cleal wrote: >>> Hi Eugene, >>> >>> You can do a similar HTTP query to get the list of classes back, which >>> would be good to check: >>> >>> curl http://smartproxy:8443/puppet/environments/production/classes >>> >>> (assuming production is the environment name) >>> >>> Which version of Foreman and Puppet? Check the mail I just sent in >>> response to Erno - quite a few people have hit that bug, it might be >>> affecting you too. >> >> >> Foreman 1.1 RC4 via RPM on Red Hat 6. Puppet master 2.7.18. >> >> Strangely, my 'production' environment doesn't come back: >> >> curl http://puppetmaster.example.com:8443/puppet/environments >> ["development","testing","datacenter_production"] >> >> Though I use it for quite a few clients. Those three environments which do come back, are empty: >> >> curl http://puppetmaster.example.com:8443/puppet/environments/testing/classes >> [] > > > Howdy again, > > Well, turns out I was missing a [production] section in puppet.conf. Adding one results in > > >>> curl http://puppetmaster.example.com:8443/puppet/environments >> >> ["development","testing","datacenter_production","production"] >> >>> curl http://puppetmaster.example.com:8443/puppet/environments/production >> >> {"paths":["$confdir/modules"],"name":"production"} >> >>> curl http://puppetmaster.example.com:8443/puppet/environments/production/classes >> [] > > In this doc[1], the modulepath is an absolute path with no variables, might that be what's wrong with my puppet.conf?


Dominic Cleal
Red Hat Engineering