Cannot import classes into foreman

Hi,

I'm trying to import classes into my foreman environment unfortunately this
is not working either by CLI or Foreman dashboard. The hosts are in
foreman, I installed a smart proxy with 'puppet' capability when I hit
import from <foreman_proxy_name> I get to following. If I select no the
action is canceled if I select yes I get an error:
Changed environments and puppet classes

Accept these environment changes found in puppet? EnvironmentOperation
Classes demo Remove: Deleted environment

Error

foreman # rake puppet:import:puppet_classes RAILS_ENV=production --trace
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10:
warning: already initialized constant ENC_NONE
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11:
warning: already initialized constant ENC_EUC
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12:
warning: already initialized constant ENC_SJIS
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13:
warning: already initialized constant ENC_UTF8
** Invoke puppet:import:puppet_classes (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute puppet:import:puppet_classes
Evaluating possible changes to your installation
Scheduled changes to your environment
Create/update environments
Delete environments
demo : Remove environment

Proceed with these modifications? <yes|no> yes
Problems were detected during the execution phase

demo is used by $fqdn
demo is used by $fqdn
demo is used by $fqdn

Import failed

Any hints on how to tackle this? My goal is to assign classes from foreman
and use as an ENC.

Regards,

Martin Willemsma

> Hi,
>
> I'm trying to import classes into my foreman environment unfortunately
> this is not working either by CLI or Foreman dashboard. The hosts are in
> foreman, I installed a smart proxy with 'puppet' capability when I hit
> import from <foreman_proxy_name> I get to following. If I select no the
> action is canceled if I select yes I get an error:
> Changed environments and puppet classes
>
> Accept these environment changes found in puppet? EnvironmentOperation
> Classes demo Remove: Deleted environment
>
> Error
>
> I'm guessing you have a permission problems where the foreman proxy user
don't have access to read your manifests, afair, by default, the proxy user
add itself to the puppet group.

a very simply check is using the proxy api, e.g.

curl http://proxy:port/puppet/environments --> should return a list of
environments
then
curl http://proxy:port/puppet/environments/production --> should return
info about the production environment

curl http://proxy:port/puppet/environments/production/classes --> should
return all classes.

this hopefully should help you identify the problem.

Ohad

foreman # rake puppet:import:puppet_classes RAILS_ENV=production --trace

··· On Mon, Aug 13, 2012 at 11:49 AM, Martin Willemsma wrote: > /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10: > warning: already initialized constant ENC_NONE > /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11: > warning: already initialized constant ENC_EUC > /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12: > warning: already initialized constant ENC_SJIS > /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13: > warning: already initialized constant ENC_UTF8 > ** Invoke puppet:import:puppet_classes (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Execute puppet:import:puppet_classes > Evaluating possible changes to your installation > Scheduled changes to your environment > Create/update environments > Delete environments > demo : Remove environment > > Proceed with these modifications? yes > Problems were detected during the execution phase > > demo is used by $fqdn > demo is used by $fqdn > demo is used by $fqdn > > > Import failed > > Any hints on how to tackle this? My goal is to assign classes from foreman > and use as an ENC. > > > Regards, > > Martin Willemsma > > -- > 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. >

>
>
>
>> Hi,
>>
>> I'm trying to import classes into my foreman environment unfortunately
>> this is not working either by CLI or Foreman dashboard. The hosts are in
>> foreman, I installed a smart proxy with 'puppet' capability when I hit
>> import from <foreman_proxy_name> I get to following. If I select no the
>> action is canceled if I select yes I get an error:
>> Changed environments and puppet classes
>>
>> Accept these environment changes found in puppet? EnvironmentOperation
>> Classes demo Remove: Deleted environment
>>
>> Error
>>
>

This is my foreman-proxy version
dpkg -l | grep fore
ii foreman-proxy
1.0-1 RESTful proxies for DNS,
DHCP, TFTP, and Pup

Ubuntu version
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid

I tried the commands you specified

foreman # curl http://<HOST>:8077/features

– SNIP
<ul>

&lt;li&gt;puppet&lt;/li&gt;

</ul>
– SNIP

>> I'm guessing you have a permission problems where the foreman proxy user
> don't have access to read your manifests, afair, by default, the proxy user
> add itself to the puppet group.
>
> a very simply check is using the proxy api, e.g.
>
> curl http://proxy:port/puppet/environments --> should return a list of
> environments
>

This one looks empty
foreman # curl http://<HOST>:8077/puppet/environments
[]

> then
> curl http://proxy:port/puppet/environments/production --> should return
> info about the production environment
>

curl http://<HOST>:8077/puppet/environments/production
Not found

>
> curl http://proxy:port/puppet/environments/production/classes --> should
> return all classes.
>

curl http://<HOST>:8077/puppet/environments/production/classes
Not found

>
> this hopefully should help you identify the problem.
>
> Ohad
>

My daemon is running as foreman-proxy
/etc/default/foreman-proxy

DAEMON_USER="foreman-proxy:foreman-proxy"

foreman-proxy is member of the group puppet

foreman # id foreman-proxy
uid=999(foreman-proxy) gid=998(foreman-proxy)
groups=1004(puppet),998(foreman-proxy)

puppet group is owner of the modulespath

foreman # ls -la /etc/puppet/env/production/modules/
total 76
drwxr-xr-x 19 puppet puppet 4096 2012-07-16 13:08 .
drwxr-xr-x 4 puppet puppet 4096 2012-07-16 13:08 …
drwxr-xr-x 6 puppet puppet 4096 2012-07-16 13:08 apache
drwxr-xr-x 6 puppet puppet 4096 2012-07-16 13:08 apt
drwxr-xr-x 6 puppet puppet 4096 2012-07-16 13:08 augeas
drwxr-xr-x 7 puppet puppet 4096 2012-07-16 13:08 baseline

does it ring any bell?

··· 2012/8/13 Ohad Levy > On Mon, Aug 13, 2012 at 11:49 AM, Martin Willemsma wrote:

foreman # rake puppet:import:puppet_classes RAILS_ENV=production --trace

/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10:
warning: already initialized constant ENC_NONE
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11:
warning: already initialized constant ENC_EUC
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12:
warning: already initialized constant ENC_SJIS
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13:
warning: already initialized constant ENC_UTF8
** Invoke puppet:import:puppet_classes (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute puppet:import:puppet_classes
Evaluating possible changes to your installation
Scheduled changes to your environment
Create/update environments
Delete environments
demo : Remove environment

Proceed with these modifications? <yes|no> yes
Problems were detected during the execution phase

demo is used by $fqdn
demo is used by $fqdn
demo is used by $fqdn

Import failed

Any hints on how to tackle this? My goal is to assign classes from
foreman and use as an ENC.

Regards,

Martin Willemsma


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.

Sort of. I've definitely seen some of this behaviour. If you run the proxy
as 'root' instead of 'foreman-proxy' does it all start working?

If so, you may be hitting Bug #1801: Permissions issue when running as non root - Smart Proxy - Foreman which others
have reported. I'm not yet sure what's causing it…

Greg

··· On 13 August 2012 13:26, Martin Willemsma wrote: > > does it ring any bell? >

>>
>> does it ring any bell?
>>
>
> Sort of. I've definitely seen some of this behaviour. If you run the proxy
> as 'root' instead of 'foreman-proxy' does it all start working?
>

Changed the DAEMON_USER to root and restarted foreman-proxy. No difference

cat /etc/default/foreman-proxy

Defaults for smart-proxy initscript

sourced by /etc/init.d/foreman-proxy

DAEMON_USER="foreman-proxy:foreman-proxy"

DAEMON_USER="root:root"
DAEMON_HOME="/usr/share/foreman-proxy"
DAEMON_ARGS=""

root 22977 0.0 0.4 125992 49476 ? S 15:24 0:00 ruby
/usr/share/foreman-proxy/bin/smart-proxy

curl reply is still empty even when running as root
curl http://<HOST>:8077/puppet/environments
[]

··· 2012/8/13 Greg Sutcliffe > On 13 August 2012 13:26, Martin Willemsma wrote:

If so, you may be hitting Bug #1801: Permissions issue when running as non root - Smart Proxy - Foreman which others
have reported. I’m not yet sure what’s causing it…

Greg


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.

Interesting. Could you show us your puppet.conf?

Regards,
Greg

··· On 13 August 2012 15:00, Martin Willemsma wrote: > Changed the DAEMON_USER to root and restarted foreman-proxy. No difference

> > Changed the DAEMON_USER to root and restarted foreman-proxy. No
> difference
>
> Interesting. Could you show us your puppet.conf?
>

Sure. <PUPPETMASTER> is a valid fqdn replaced for privacy reasons

[main]
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

The default value is '$vardir/clientbucket'.

clientbucketdir = /var/lib/puppet/clientbucket
bucketdir = /var/lib/puppet/bucket

fileserverconfig=/etc/puppet/fileserver.conf
reportdir = /etc/puppet/reports

reports = store,http,foreman,tagmail
rrddir = $vardir/rrd

reporturl = http://<PUPPETMASTER>:8080/reports

[master]

use puppetdashboard as External Node Classifier ( ENC )

node_terminus = exec
external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://<PUPPETMASTER>:8080
/usr/share/puppet-dashboard/bin/external_node

storeconfigs = true
storeconfigs_backend = puppetdb

autosign=false
certname=<PUPPETMASTER>

modulepath = $confdir/env/$environment/modules
manifestdir = $confdir/env/$environment/manifests
manifest = $confdir/env/$environment/manifests/site.pp

ca=false

rrddirgraph = true
rrdinterval = $runinterval
rrdgraph = true

ssl_client_verify_header = HTTP_X_CLIENT_VERIFY
ssl_client_header = HTTP_X_CLIENT_DN

smtpserver = mail.<COMPANY>

We have 2 puppetmasters, one CA and this one running foreman and puppet
dashboards .

puppet --version
2.7.18

··· 2012/8/13 Greg Sutcliffe > On 13 August 2012 15:00, Martin Willemsma wrote:

Regards,
Greg


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.


Met vriendelijke groet, Kind Regards,

Martin Willemsma

>
>
>> > Changed the DAEMON_USER to root and restarted foreman-proxy. No
>> difference
>>
>> Interesting. Could you show us your puppet.conf?
>>
>
>
> Sure. <PUPPETMASTER> is a valid fqdn replaced for privacy reasons
>
> [main]
> 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
>
> # The default value is '$vardir/clientbucket'.
> clientbucketdir = /var/lib/puppet/clientbucket
> bucketdir = /var/lib/puppet/bucket
>
> fileserverconfig=/etc/puppet/fileserver.conf
> reportdir = /etc/puppet/reports
>
> reports = store,http,foreman,tagmail
> rrddir = $vardir/rrd
>
> reporturl = http://<PUPPETMASTER>:8080/reports
>
> [master]
>
> # use puppetdashboard as External Node Classifier ( ENC )
> node_terminus = exec
> external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://<PUPPETMASTER>:
> 8080 /usr/share/puppet-dashboard/bin/external_node
>
> storeconfigs = true
> storeconfigs_backend = puppetdb
>
> autosign=false
> certname=<PUPPETMASTER>
>
> modulepath = $confdir/env/$environment/modules
> manifestdir = $confdir/env/$environment/manifests
> manifest = $confdir/env/$environment/manifests/site.pp
>
> Someone mentioned that the $confdir expanding stopped working, can you try
putting in the full path and see if that works?

Ohad

ca=false

··· On Mon, Aug 13, 2012 at 5:20 PM, Martin Willemsma wrote: > 2012/8/13 Greg Sutcliffe >> On 13 August 2012 15:00, Martin Willemsma wrote: > > rrddirgraph = true > rrdinterval = $runinterval > rrdgraph = true > > ssl_client_verify_header = HTTP_X_CLIENT_VERIFY > ssl_client_header = HTTP_X_CLIENT_DN > > smtpserver = mail. > > We have 2 puppetmasters, one CA and this one running foreman and puppet > dashboards . > > puppet --version > 2.7.18 > > > >> >> Regards, >> Greg >> >> -- >> 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. >> >> > > > -- > Met vriendelijke groet, Kind Regards, > > Martin Willemsma > > -- > 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. >

Does this mean that
http://theforeman.org/projects/smart-proxy/repository/revisions/2d232cffb4c90a27c0a1dc5a00d8fd733428f146/diff/lib/proxy/puppet/environment.rb
doesn't
work?

··· On Mon, Aug 13, 2012 at 10:45 AM, Martin Willemsma wrote:

2012/8/13 Ohad Levy ohadlevy@gmail.com

On Mon, Aug 13, 2012 at 5:20 PM, Martin Willemsma mwillemsma@gmail.comwrote:

2012/8/13 Greg Sutcliffe greg.sutcliffe@gmail.com

On 13 August 2012 15:00, Martin Willemsma mwillemsma@gmail.com wrote:

Changed the DAEMON_USER to root and restarted foreman-proxy. No
difference

Interesting. Could you show us your puppet.conf?

Sure. is a valid fqdn replaced for privacy reasons

[main]
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

The default value is ‘$vardir/clientbucket’.

clientbucketdir = /var/lib/puppet/clientbucket
bucketdir = /var/lib/puppet/bucket

fileserverconfig=/etc/puppet/fileserver.conf
reportdir = /etc/puppet/reports

reports = store,http,foreman,tagmail
rrddir = $vardir/rrd

reporturl = http://:8080/reports

[master]

use puppetdashboard as External Node Classifier ( ENC )

node_terminus = exec
external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://
:8080 /usr/share/puppet-dashboard/bin/external_node

storeconfigs = true
storeconfigs_backend = puppetdb

autosign=false
certname=

modulepath = $confdir/env/$environment/modules
manifestdir = $confdir/env/$environment/manifests
manifest = $confdir/env/$environment/manifests/site.pp

Someone mentioned that the $confdir expanding stopped working, can you
try putting in the full path and see if that works?

Ohad

Changing var $confdir into /etc/puppet did the trick!

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

{“paths”:["/etc/puppet/env/production/modules"],“name”:“production”}

curl http://:8443/puppet/environments/production/classes
[{“motd::setup”:{“module”:“motd”,“name”:“setup”}},{“motd”:{“module”:null,“name”:“motd”}},{“augeas::base”:{“module”:“augeas”,“name”:“base”}},{“augeas::params”:{“module”:“augeas”,“name”:“params”}},{“augeas::debian”:{“module”:“augeas”,“name”:“debian”}},{“augeas::redhat”:{“module”:“augeas”,“name”:“redhat”}},{“augeas”:{“module”:null,“name”:“augeas”}},{“yum::repos::redhat”:{“module”:“yum”,“name”:“repos::redhat”}}

  • CUT -
    ]

As expected! Cool Thanks for the help. I will run some tests and hope to
switch to foreman as ENC real soon.

ca=false

rrddirgraph = true
rrdinterval = $runinterval
rrdgraph = true

ssl_client_verify_header = HTTP_X_CLIENT_VERIFY
ssl_client_header = HTTP_X_CLIENT_DN

smtpserver = mail.

We have 2 puppetmasters, one CA and this one running foreman and puppet
dashboards .

puppet --version
2.7.18

Regards,
Greg


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.


Met vriendelijke groet, Kind Regards,

Martin Willemsma


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.


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.

>
>
>
>>
>>
>>> > Changed the DAEMON_USER to root and restarted foreman-proxy. No
>>> difference
>>>
>>> Interesting. Could you show us your puppet.conf?
>>>
>>
>>
>> Sure. <PUPPETMASTER> is a valid fqdn replaced for privacy reasons
>>
>> [main]
>> 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
>>
>> # The default value is '$vardir/clientbucket'.
>> clientbucketdir = /var/lib/puppet/clientbucket
>> bucketdir = /var/lib/puppet/bucket
>>
>> fileserverconfig=/etc/puppet/fileserver.conf
>> reportdir = /etc/puppet/reports
>>
>> reports = store,http,foreman,tagmail
>> rrddir = $vardir/rrd
>>
>> reporturl = http://<PUPPETMASTER>:8080/reports
>>
>> [master]
>>
>> # use puppetdashboard as External Node Classifier ( ENC )
>> node_terminus = exec
>> external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://<PUPPETMASTER>:
>> 8080 /usr/share/puppet-dashboard/bin/external_node
>>
>> storeconfigs = true
>> storeconfigs_backend = puppetdb
>>
>> autosign=false
>> certname=<PUPPETMASTER>
>>
>> modulepath = $confdir/env/$environment/modules
>> manifestdir = $confdir/env/$environment/manifests
>> manifest = $confdir/env/$environment/manifests/site.pp
>>
>> Someone mentioned that the $confdir expanding stopped working, can you
> try putting in the full path and see if that works?
>
> Ohad
>

Changing var $confdir into /etc/puppet did the trick!

curl http://<HOST>:8443/puppet/environments/production

{"paths":["/etc/puppet/env/production/modules"],"name":"production"}

curl http://<HOST>:8443/puppet/environments/production/classes
[{"motd::setup":{"module":"motd","name":"setup"}},{"motd":{"module":null,"name":"motd"}},{"augeas::base":{"module":"augeas","name":"base"}},{"augeas::params":{"module":"augeas","name":"params"}},{"augeas::debian":{"module":"augeas","name":"debian"}},{"augeas::redhat":{"module":"augeas","name":"redhat"}},{"augeas":{"module":null,"name":"augeas"}},{"yum::repos::redhat":{"module":"yum","name":"repos::redhat"}}

  • CUT -
    ]

As expected! Cool Thanks for the help. I will run some tests and hope to
switch to foreman as ENC real soon.

··· 2012/8/13 Ohad Levy > On Mon, Aug 13, 2012 at 5:20 PM, Martin Willemsma wrote: >> 2012/8/13 Greg Sutcliffe >>> On 13 August 2012 15:00, Martin Willemsma wrote:

ca=false

rrddirgraph = true
rrdinterval = $runinterval
rrdgraph = true

ssl_client_verify_header = HTTP_X_CLIENT_VERIFY
ssl_client_header = HTTP_X_CLIENT_DN

smtpserver = mail.

We have 2 puppetmasters, one CA and this one running foreman and puppet
dashboards .

puppet --version
2.7.18

Regards,
Greg


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.


Met vriendelijke groet, Kind Regards,

Martin Willemsma


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.

Hi Sam,

Is that commit in debian package foreman-proxy version 1.0-1? That's the
version I'm using on this node.

··· 2012/8/13 Sam Kottler

Does this mean that
/lib/proxy/puppet/environment.rb - Diff - Smart Proxy - Foreman doesn’t
work?

On Mon, Aug 13, 2012 at 10:45 AM, Martin Willemsma mwillemsma@gmail.comwrote:

2012/8/13 Ohad Levy ohadlevy@gmail.com

On Mon, Aug 13, 2012 at 5:20 PM, Martin Willemsma mwillemsma@gmail.comwrote:

2012/8/13 Greg Sutcliffe greg.sutcliffe@gmail.com

On 13 August 2012 15:00, Martin Willemsma mwillemsma@gmail.com >>>>> wrote:

Changed the DAEMON_USER to root and restarted foreman-proxy. No
difference

Interesting. Could you show us your puppet.conf?

Sure. is a valid fqdn replaced for privacy reasons

[main]
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

The default value is ‘$vardir/clientbucket’.

clientbucketdir = /var/lib/puppet/clientbucket
bucketdir = /var/lib/puppet/bucket

fileserverconfig=/etc/puppet/fileserver.conf
reportdir = /etc/puppet/reports

reports = store,http,foreman,tagmail
rrddir = $vardir/rrd

reporturl = http://:8080/reports

[master]

use puppetdashboard as External Node Classifier ( ENC )

node_terminus = exec
external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://
:8080 /usr/share/puppet-dashboard/bin/external_node

storeconfigs = true
storeconfigs_backend = puppetdb

autosign=false
certname=

modulepath = $confdir/env/$environment/modules
manifestdir = $confdir/env/$environment/manifests
manifest = $confdir/env/$environment/manifests/site.pp

Someone mentioned that the $confdir expanding stopped working, can you
try putting in the full path and see if that works?

Ohad

Changing var $confdir into /etc/puppet did the trick!

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

{“paths”:["/etc/puppet/env/production/modules"],“name”:“production”}

curl http://:8443/puppet/environments/production/classes
[{“motd::setup”:{“module”:“motd”,“name”:“setup”}},{“motd”:{“module”:null,“name”:“motd”}},{“augeas::base”:{“module”:“augeas”,“name”:“base”}},{“augeas::params”:{“module”:“augeas”,“name”:“params”}},{“augeas::debian”:{“module”:“augeas”,“name”:“debian”}},{“augeas::redhat”:{“module”:“augeas”,“name”:“redhat”}},{“augeas”:{“module”:null,“name”:“augeas”}},{“yum::repos::redhat”:{“module”:“yum”,“name”:“repos::redhat”}}

  • CUT -
    ]

As expected! Cool Thanks for the help. I will run some tests and hope to
switch to foreman as ENC real soon.

ca=false

rrddirgraph = true
rrdinterval = $runinterval
rrdgraph = true

ssl_client_verify_header = HTTP_X_CLIENT_VERIFY
ssl_client_header = HTTP_X_CLIENT_DN

smtpserver = mail.

We have 2 puppetmasters, one CA and this one running foreman and puppet
dashboards .

puppet --version
2.7.18

Regards,
Greg


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.


Met vriendelijke groet, Kind Regards,

Martin Willemsma


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.


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.


Met vriendelijke groet, Kind Regards,

Martin Willemsma

> Does this mean that
> /lib/proxy/puppet/environment.rb - Diff - Smart Proxy - Foreman doesn't
> work?
>
>
looking at that code, the only reason I could see that breaks is that if
$confdir is not under the main section

Ohad

··· On Mon, Aug 13, 2012 at 6:04 PM, Sam Kottler wrote:

On Mon, Aug 13, 2012 at 10:45 AM, Martin Willemsma mwillemsma@gmail.comwrote:

2012/8/13 Ohad Levy ohadlevy@gmail.com

On Mon, Aug 13, 2012 at 5:20 PM, Martin Willemsma mwillemsma@gmail.comwrote:

2012/8/13 Greg Sutcliffe greg.sutcliffe@gmail.com

On 13 August 2012 15:00, Martin Willemsma mwillemsma@gmail.com >>>>> wrote:

Changed the DAEMON_USER to root and restarted foreman-proxy. No
difference

Interesting. Could you show us your puppet.conf?

Sure. is a valid fqdn replaced for privacy reasons

[main]
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

The default value is ‘$vardir/clientbucket’.

clientbucketdir = /var/lib/puppet/clientbucket
bucketdir = /var/lib/puppet/bucket

fileserverconfig=/etc/puppet/fileserver.conf
reportdir = /etc/puppet/reports

reports = store,http,foreman,tagmail
rrddir = $vardir/rrd

reporturl = http://:8080/reports

[master]

use puppetdashboard as External Node Classifier ( ENC )

node_terminus = exec
external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://
:8080 /usr/share/puppet-dashboard/bin/external_node

storeconfigs = true
storeconfigs_backend = puppetdb

autosign=false
certname=

modulepath = $confdir/env/$environment/modules
manifestdir = $confdir/env/$environment/manifests
manifest = $confdir/env/$environment/manifests/site.pp

Someone mentioned that the $confdir expanding stopped working, can you
try putting in the full path and see if that works?

Ohad

Changing var $confdir into /etc/puppet did the trick!

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

{“paths”:["/etc/puppet/env/production/modules"],“name”:“production”}

curl http://:8443/puppet/environments/production/classes
[{“motd::setup”:{“module”:“motd”,“name”:“setup”}},{“motd”:{“module”:null,“name”:“motd”}},{“augeas::base”:{“module”:“augeas”,“name”:“base”}},{“augeas::params”:{“module”:“augeas”,“name”:“params”}},{“augeas::debian”:{“module”:“augeas”,“name”:“debian”}},{“augeas::redhat”:{“module”:“augeas”,“name”:“redhat”}},{“augeas”:{“module”:null,“name”:“augeas”}},{“yum::repos::redhat”:{“module”:“yum”,“name”:“repos::redhat”}}

  • CUT -
    ]

As expected! Cool Thanks for the help. I will run some tests and hope to
switch to foreman as ENC real soon.

ca=false

rrddirgraph = true
rrdinterval = $runinterval
rrdgraph = true

ssl_client_verify_header = HTTP_X_CLIENT_VERIFY
ssl_client_header = HTTP_X_CLIENT_DN

smtpserver = mail.

We have 2 puppetmasters, one CA and this one running foreman and puppet
dashboards .

puppet --version
2.7.18

Regards,
Greg


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.


Met vriendelijke groet, Kind Regards,

Martin Willemsma


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.


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.

>
>
>
>> Does this mean that
>> /lib/proxy/puppet/environment.rb - Diff - Smart Proxy - Foreman doesn't
>> work?
>>
>>
> looking at that code, the only reason I could see that breaks is that if
> $confdir is not under the main section
>

I tried putting these line under [main] and restarted by puppetmaster

modulepath = $confdir/env/$environment/modules
manifestdir = $confdir/env/$environment/manifests
manifest = $confdir/env/$environment/manifests/site.pp

If I test this it fails

curl http://<HOST>:8443/puppet/environments/production/classes
Not found

··· 2012/8/14 Ohad Levy > On Mon, Aug 13, 2012 at 6:04 PM, Sam Kottler wrote:

Ohad

On Mon, Aug 13, 2012 at 10:45 AM, Martin Willemsma mwillemsma@gmail.comwrote:

2012/8/13 Ohad Levy ohadlevy@gmail.com

On Mon, Aug 13, 2012 at 5:20 PM, Martin Willemsma <mwillemsma@gmail.com >>>> > wrote:

2012/8/13 Greg Sutcliffe greg.sutcliffe@gmail.com

On 13 August 2012 15:00, Martin Willemsma mwillemsma@gmail.com >>>>>> wrote:

Changed the DAEMON_USER to root and restarted foreman-proxy. No
difference

Interesting. Could you show us your puppet.conf?

Sure. is a valid fqdn replaced for privacy reasons

[main]
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

The default value is ‘$vardir/clientbucket’.

clientbucketdir = /var/lib/puppet/clientbucket
bucketdir = /var/lib/puppet/bucket

fileserverconfig=/etc/puppet/fileserver.conf
reportdir = /etc/puppet/reports

reports = store,http,foreman,tagmail
rrddir = $vardir/rrd

reporturl = http://:8080/reports

[master]

use puppetdashboard as External Node Classifier ( ENC )

node_terminus = exec
external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://
:8080 /usr/share/puppet-dashboard/bin/external_node

storeconfigs = true
storeconfigs_backend = puppetdb

autosign=false
certname=

modulepath = $confdir/env/$environment/modules
manifestdir = $confdir/env/$environment/manifests
manifest = $confdir/env/$environment/manifests/site.pp

Someone mentioned that the $confdir expanding stopped working, can you
try putting in the full path and see if that works?

Ohad

Changing var $confdir into /etc/puppet did the trick!

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

{“paths”:["/etc/puppet/env/production/modules"],“name”:“production”}

curl http://:8443/puppet/environments/production/classes
[{“motd::setup”:{“module”:“motd”,“name”:“setup”}},{“motd”:{“module”:null,“name”:“motd”}},{“augeas::base”:{“module”:“augeas”,“name”:“base”}},{“augeas::params”:{“module”:“augeas”,“name”:“params”}},{“augeas::debian”:{“module”:“augeas”,“name”:“debian”}},{“augeas::redhat”:{“module”:“augeas”,“name”:“redhat”}},{“augeas”:{“module”:null,“name”:“augeas”}},{“yum::repos::redhat”:{“module”:“yum”,“name”:“repos::redhat”}}

  • CUT -
    ]

As expected! Cool Thanks for the help. I will run some tests and hope to
switch to foreman as ENC real soon.

ca=false

rrddirgraph = true
rrdinterval = $runinterval
rrdgraph = true

ssl_client_verify_header = HTTP_X_CLIENT_VERIFY
ssl_client_header = HTTP_X_CLIENT_DN

smtpserver = mail.

We have 2 puppetmasters, one CA and this one running foreman and
puppet dashboards .

puppet --version
2.7.18

Regards,
Greg


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.


Met vriendelijke groet, Kind Regards,

Martin Willemsma


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.


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.


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.


Met vriendelijke groet, Kind Regards,

Martin Willemsma