Puppet 3 Class import with Foreman 1.1RC1

Afternoon all

I've just updated my Foreman installation to 1.1RC1 in order to try and get
Foreman working with our Puppet 3.0 installation.

First thing I've tried is importing Puppet Classes, however it's still
failing with '406 Not Acceptable'.

Full stack is:
RestClient::NotAcceptable
406 Not Acceptable
lib/proxy_api.rb:58:in get' lib/proxy_api.rb:96:inclasses'
app/models/puppet_class_importer.rb:143:in actual_classes' app/models/puppet_class_importer.rb:66:innew_classes_for'
app/models/puppet_class_importer.rb:22:in changes' app/models/puppet_class_importer.rb:21:ineach'
app/models/puppet_class_importer.rb:21:in changes' lib/foreman/controller/environments.rb:9:inimport_environments'
lib/foreman/threadsession.rb:31:in `clear_thread'

Puppet install is all standard, with manifests and modules in /etc/puppet
and $vardir in /var/lib/puppet…

I've restarted the foreman and foreman-proxy services to no avail.

Any ideas?

Cheers
Gavin

Can you check the log files from the proxy service
(/var/log/foreman-proxy/proxy.log normally)? The 406 line is an HTTP
error provided by the proxy.

··· On 21/12/12 17:16, Gavin Williams wrote: > Afternoon all > > I've just updated my Foreman installation to 1.1RC1 in order to try and > get Foreman working with our Puppet 3.0 installation. > > First thing I've tried is importing Puppet Classes, however it's still > failing with '406 Not Acceptable'. > > Full stack is: > /RestClient::NotAcceptable/ > *406 Not Acceptable* > lib/proxy_api.rb:58:in `get' > lib/proxy_api.rb:96:in `classes' > app/models/puppet_class_importer.rb:143:in `actual_classes' > app/models/puppet_class_importer.rb:66:in `new_classes_for' > app/models/puppet_class_importer.rb:22:in `changes' > app/models/puppet_class_importer.rb:21:in `each' > app/models/puppet_class_importer.rb:21:in `changes' > lib/foreman/controller/environments.rb:9:in `import_environments' > lib/foreman/threadsession.rb:31:in `clear_thread' > > Puppet install is all standard, with manifests and modules in > /etc/puppet and $vardir in /var/lib/puppet... > > I've restarted the foreman and foreman-proxy services to no avail.


Dominic Cleal
Red Hat Engineering

did you update your proxy as well?

Ohad

··· On Fri, Dec 21, 2012 at 7:16 PM, Gavin Williams wrote:

Afternoon all

I’ve just updated my Foreman installation to 1.1RC1 in order to try and
get Foreman working with our Puppet 3.0 installation.

First thing I’ve tried is importing Puppet Classes, however it’s still
failing with ‘406 Not Acceptable’.

Full stack is:
RestClient::NotAcceptable
406 Not Acceptable
lib/proxy_api.rb:58:in get' lib/proxy_api.rb:96:inclasses’
app/models/puppet_class_importer.rb:143:in actual_classes' app/models/puppet_class_importer.rb:66:innew_classes_for’
app/models/puppet_class_importer.rb:22:in changes' app/models/puppet_class_importer.rb:21:ineach’
app/models/puppet_class_importer.rb:21:in changes' lib/foreman/controller/environments.rb:9:inimport_environments’
lib/foreman/threadsession.rb:31:in `clear_thread’

Puppet install is all standard, with manifests and modules in /etc/puppet
and $vardir in /var/lib/puppet…

I’ve restarted the foreman and foreman-proxy services to no avail.

Any ideas?

Cheers
Gavin


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/foreman-users/-/a6K1lsTqeQkJ.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

I added the Foreman RC Yum repo, and did a 'yum foreman update'.

Pretty sure the proxy package was also upgraded…
Will check and advise though :slight_smile:

Cheers
Gav

··· On 21 December 2012 18:37, Ohad Levy wrote:

did you update your proxy as well?

Ohad

On Fri, Dec 21, 2012 at 7:16 PM, Gavin Williams fatmcgav@gmail.comwrote:

Afternoon all

I’ve just updated my Foreman installation to 1.1RC1 in order to try and
get Foreman working with our Puppet 3.0 installation.

First thing I’ve tried is importing Puppet Classes, however it’s still
failing with ‘406 Not Acceptable’.

Full stack is:
RestClient::NotAcceptable
406 Not Acceptable
lib/proxy_api.rb:58:in get' lib/proxy_api.rb:96:inclasses’
app/models/puppet_class_importer.rb:143:in actual_classes' app/models/puppet_class_importer.rb:66:innew_classes_for’
app/models/puppet_class_importer.rb:22:in changes' app/models/puppet_class_importer.rb:21:ineach’
app/models/puppet_class_importer.rb:21:in changes' lib/foreman/controller/environments.rb:9:inimport_environments’
lib/foreman/threadsession.rb:31:in `clear_thread’

Puppet install is all standard, with manifests and modules in /etc/puppet
and $vardir in /var/lib/puppet…

I’ve restarted the foreman and foreman-proxy services to no avail.

Any ideas?

Cheers
Gavin


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/foreman-users/-/a6K1lsTqeQkJ.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Sorry all, looks like Ohad was bang on.

Foreman upgrade didn't include foreman-proxy, so have just upgraded that
and restarted the foreman-proxy service, and hey presto, Puppet class
import works :slight_smile: :smiley:

Cheers again.

Gavin

··· On 21 December 2012 18:00, Dominic Cleal wrote:

On 21/12/12 17:16, Gavin Williams wrote:

Afternoon all

I’ve just updated my Foreman installation to 1.1RC1 in order to try and
get Foreman working with our Puppet 3.0 installation.

First thing I’ve tried is importing Puppet Classes, however it’s still
failing with ‘406 Not Acceptable’.

Full stack is:
/RestClient::NotAcceptable/
406 Not Acceptable
lib/proxy_api.rb:58:in get' lib/proxy_api.rb:96:inclasses’
app/models/puppet_class_importer.rb:143:in actual_classes' app/models/puppet_class_importer.rb:66:innew_classes_for’
app/models/puppet_class_importer.rb:22:in changes' app/models/puppet_class_importer.rb:21:ineach’
app/models/puppet_class_importer.rb:21:in changes' lib/foreman/controller/environments.rb:9:inimport_environments’
lib/foreman/threadsession.rb:31:in `clear_thread’

Puppet install is all standard, with manifests and modules in
/etc/puppet and $vardir in /var/lib/puppet…

I’ve restarted the foreman and foreman-proxy services to no avail.

Can you check the log files from the proxy service
(/var/log/foreman-proxy/proxy.log normally)? The 406 line is an HTTP
error provided by the proxy.


Dominic Cleal
Red Hat Engineering


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Should we pin the requires for foreman 1.1 to foreman-proxy 1.1 to prevent issues like this from arising?

-Sam

··· ----- Forwarded Message ----- From: "fatmcgav" To: foreman-users@googlegroups.com Sent: Friday, December 21, 2012 2:04:37 PM Subject: Re: [foreman-users] Puppet 3 Class import with Foreman 1.1RC1

Sorry all, looks like Ohad was bang on.

Foreman upgrade didn’t include foreman-proxy, so have just upgraded that and restarted the foreman-proxy service, and hey presto, Puppet class import works :slight_smile: :smiley:

Cheers again.

Gavin

On 21 December 2012 18:00, Dominic Cleal < dcleal@redhat.com > wrote:

On 21/12/12 17:16, Gavin Williams wrote:

Afternoon all

I’ve just updated my Foreman installation to 1.1RC1 in order to try and
get Foreman working with our Puppet 3.0 installation.

First thing I’ve tried is importing Puppet Classes, however it’s still
failing with ‘406 Not Acceptable’.

Full stack is:
/RestClient::NotAcceptable/
406 Not Acceptable

lib/proxy_api.rb:58:in get' lib/proxy_api.rb:96:inclasses’
app/models/puppet_class_importer.rb:143:in actual_classes' app/models/puppet_class_importer.rb:66:innew_classes_for’
app/models/puppet_class_importer.rb:22:in changes' app/models/puppet_class_importer.rb:21:ineach’
app/models/puppet_class_importer.rb:21:in changes' lib/foreman/controller/environments.rb:9:inimport_environments’
lib/foreman/threadsession.rb:31:in `clear_thread’

Puppet install is all standard, with manifests and modules in
/etc/puppet and $vardir in /var/lib/puppet…

I’ve restarted the foreman and foreman-proxy services to no avail.

Can you check the log files from the proxy service
(/var/log/foreman-proxy/proxy.log normally)? The 406 line is an HTTP
error provided by the proxy.


Dominic Cleal
Red Hat Engineering


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com .
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com .
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en .


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.

Any reason not to? Thanks, Brian

··· On Fri, Dec 21, 2012 at 2:11 PM, Sam Kottler wrote:

Should we pin the requires for foreman 1.1 to foreman-proxy 1.1 to prevent
issues like this from arising?

-Sam

----- Forwarded Message -----
From: “fatmcgav” fatmcgav@gmail.com
To: foreman-users@googlegroups.com
Sent: Friday, December 21, 2012 2:04:37 PM
Subject: Re: [foreman-users] Puppet 3 Class import with Foreman 1.1RC1

Sorry all, looks like Ohad was bang on.

Foreman upgrade didn’t include foreman-proxy, so have just upgraded that
and restarted the foreman-proxy service, and hey presto, Puppet class
import works :slight_smile: :smiley:

Cheers again.

Gavin

On 21 December 2012 18:00, Dominic Cleal < dcleal@redhat.com > wrote:

On 21/12/12 17:16, Gavin Williams wrote:

Afternoon all

I’ve just updated my Foreman installation to 1.1RC1 in order to try and
get Foreman working with our Puppet 3.0 installation.

First thing I’ve tried is importing Puppet Classes, however it’s still
failing with ‘406 Not Acceptable’.

Full stack is:
/RestClient::NotAcceptable/
406 Not Acceptable

lib/proxy_api.rb:58:in get' lib/proxy_api.rb:96:inclasses’
app/models/puppet_class_importer.rb:143:in actual_classes' app/models/puppet_class_importer.rb:66:innew_classes_for’
app/models/puppet_class_importer.rb:22:in changes' app/models/puppet_class_importer.rb:21:ineach’
app/models/puppet_class_importer.rb:21:in changes' lib/foreman/controller/environments.rb:9:inimport_environments’
lib/foreman/threadsession.rb:31:in `clear_thread’

Puppet install is all standard, with manifests and modules in
/etc/puppet and $vardir in /var/lib/puppet…

I’ve restarted the foreman and foreman-proxy services to no avail.

Can you check the log files from the proxy service
(/var/log/foreman-proxy/proxy.log normally)? The 406 line is an HTTP
error provided by the proxy.


Dominic Cleal
Red Hat Engineering


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com .
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en .


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


http://aws.amazon.com/solutions/solution-providers/brandorr/

Its valid to install foreman without a proxy on the same machine

Ohad

··· On Sat, Dec 22, 2012 at 12:14 AM, Brian Gupta wrote:

Any reason not to? Thanks, Brian

>
>
>
>> Any reason not to? Thanks, Brian
>>
> Its valid to install foreman without a proxy on the same machine
>

Err… then our 1.0 release notes, which I based this assumption on, are
wrong:

"Foreman is now completely seperated from a puppet master, which means that
if you need foreman to communicate (import puppet classes, puppetrun,
puppetca etc) with Puppet (even if its on the same machine), you need to
install a Smart
Proxy<Smart-Proxy Installation - Foreman>
"

http://theforeman.org/projects/foreman/wiki/ReleaseNotes

(Personally, I am totally ok with making proxy mandatory to talk with
Puppet.)

Ohad

··· On Sun, Dec 23, 2012 at 1:51 AM, Ohad Levy wrote: > On Sat, Dec 22, 2012 at 12:14 AM, Brian Gupta wrote: >


http://aws.amazon.com/solutions/solution-providers/brandorr/

maybe I wasnt clear, foreman needs a proxy to communicate with puppet, but
I'm not sure if we can make the foreman package depend on a proxy package
(and its version), simply because your foreman server might be
a completely different server from where your proxy needs to run.

we could have version checks inside foreman api calls, which can ensure
that we are communicating with the version of proxy we need?

Ohad

··· On Sun, Dec 23, 2012 at 2:36 PM, Brian Gupta wrote:

rr… then our 1.0 release notes, which I based this assumption on, are
wrong:

"Foreman is now completely seperated from a puppet master, which means
that if you need foreman to communicate (import puppet classes, puppetrun,
puppetca etc) with Puppet (even if its on the same machine), you need to
install a Smart Proxyhttp://theforeman.org/projects/foreman/wiki/Smart-Proxy_Installation
"

ReleaseNotes - Foreman

(Personally, I am totally ok with making proxy mandatory to talk with
Puppet.)

>
>
>
>>
>> rr… then our 1.0 release notes, which I based this assumption on, are
wrong:
>>
>> "Foreman is now completely seperated from a puppet master, which means
that if you need foreman to communicate (import puppet classes, puppetrun,
puppetca etc) with Puppet (even if its on the same machine), you need to
install a Smart Proxy"
>>
>> ReleaseNotes - Foreman
>>
>> (Personally, I am totally ok with making proxy mandatory to talk with
Puppet.)
>
>
> maybe I wasnt clear, foreman needs a proxy to communicate with puppet,
but I'm not sure if we can make the foreman package depend on a proxy
package (and its version), simply because your foreman server might be
a completely different server from where your proxy needs to run.
>
> we could have version checks inside foreman api calls, which can ensure
that we are communicating with the version of proxy we need?
>
> Ohad

Ah sorry read it too quickly, and probably confused which thread we were
on. You are correct and having foreman check proxy api version seems a
solid approach.

Perhaps we also could do meta packages that differentiate between foreman
standalone and foreman+puppet?

··· On Dec 23, 2012 7:39 AM, "Ohad Levy" wrote: > On Sun, Dec 23, 2012 at 2:36 PM, Brian Gupta wrote:

>
> Ah sorry read it too quickly, and probably confused which thread we were on.
> You are correct and having foreman check proxy api version seems a solid
> approach.

This sounds fine to me.

> Perhaps we also could do meta packages that differentiate between foreman
> standalone and foreman+puppet?

We already have enough different packages. I think another package is
likely to increase confusion, rather than decrease it. I'm with Sam on
this - let's be sure the docs are good enough :slight_smile:

··· On 23 December 2012 12:46, Brian Gupta wrote:

I suppose we could take that route, but it's probably just easier to add some information in the release notes and upgrade documentation that tells users they need to upgrade their proxy to 1.1 in addition to Foreman itself for Puppet 3 support.

··· ----- Original Message ----- From: "Brian Gupta" To: "foreman-dev" Sent: Sunday, December 23, 2012 7:46:08 AM Subject: Re: [foreman-dev] Fwd: [foreman-users] Puppet 3 Class import with Foreman 1.1RC1

On Dec 23, 2012 7:39 AM, “Ohad Levy” < ohadlevy@gmail.com > wrote:

On Sun, Dec 23, 2012 at 2:36 PM, Brian Gupta < brian.gupta@brandorr.com > wrote:

rr… then our 1.0 release notes, which I based this assumption on, are wrong:

“Foreman is now completely seperated from a puppet master, which means that if you need foreman to communicate (import puppet classes, puppetrun, puppetca etc) with Puppet (even if its on the same machine), you need to install a Smart Proxy”

ReleaseNotes - Foreman

(Personally, I am totally ok with making proxy mandatory to talk with Puppet.)

maybe I wasnt clear, foreman needs a proxy to communicate with puppet, but I’m not sure if we can make the foreman package depend on a proxy package (and its version), simply because your foreman server might be a completely different server from where your proxy needs to run.

we could have version checks inside foreman api calls, which can ensure that we are communicating with the version of proxy we need?

Ohad

Ah sorry read it too quickly, and probably confused which thread we were on. You are correct and having foreman check proxy api version seems a solid approach.

Perhaps we also could do meta packages that differentiate between foreman standalone and foreman+puppet?