Bug #1159
closed
Class import behaviour not consistent "rake puppet:import:puppet_classes" x "UI"
Added by Marcello de Sousa over 13 years ago.
Updated almost 12 years ago.
Description
I was assuming and hoping "rake puppet:import:puppet_classes" and "Import new puppet classes and environments" (button in the UI) would share the same code and behaviour but this doesn's seem to be the case.
When I run the rake task I get:
No changes detected
When I clink on the Import button via the UI I get:
Unable to find directory /etc/puppet/modules in environment production
I've tried to set an empty string in Foreman's "modulepath" setting and then by clicking in the import via UI it wants to delete all classes from all environments (Weird!).
- Target version deleted (
0.4)
- Target version set to 0.4
I face the same problem. Here is my puppet.conf:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
server=puppet.mydomain.tld
external_nodes=/etc/puppet/external_node.rb
node_terminus=exec
#pluginsync=true
reports=log,foreman
[master]
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
storeconfigs=true
#thin_storeconfigs = true
dbadapter=mysql
dbuser=puppet
dbpassword=secret
dbserver=localhost
dbsocket=/var/run/mysqld/mysqld.sock
[production]
modulepath=/etc/puppet/modules
[dev]
modulepath=/etc/puppet/modules
[staging]
modulepath=/etc/puppet/modules
HTH
Tks,
Olivier
Olivier Le Cam wrote:
I face the same problem. Here is my puppet.conf:
[...]
This applies to puppet version 2.6.2-5+squeeze1
Tks,
Olivier
Same for me:
puppet-server-2.7.5-1.el6.noarch
puppet.conf:
[main]
- Where Puppet stores dynamic and growing data.
- The default value is '/var/puppet'.
vardir = /var/lib/puppet
- The Puppet log directory.
- The default value is '$vardir/log'.
logdir = /var/log/puppet
- Where Puppet PID files are kept.
- The default value is '$vardir/run'.
rundir = /var/run/puppet
- Where SSL certificates are kept.
- The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
environment = development
pluginsync = true
factpath = $vardir/lib/facter
report = true
[agent]
- The file in which puppetd stores a list of the classes
- associated with the retrieved configuratiion. Can be loaded in
- the separate ``puppet`` executable using the ``--loadclasses``
- option.
- The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
- Where puppetd caches the local configuration. An
- extension indicating the cache format is added automatically.
- The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
- Refine templatedir.
templatedir = /etc/puppet/templates
[master]
factpath = /etc/puppet/facts
environment = development
autosign = /etc/puppet/autosign.conf
storeconfigs = true
dbadapter = postgresql
dbuser = puppet
dbpassword = xxx
dbserver = localhost
dbname = puppet
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
reports=log, foreman
external_nodes=/etc/puppet/node.rb
node_terminus=exec
[development]
modulepath = /etc/puppet/modules/development
In my installation, I think that this bug is due to the usage of Foreman user.
Rake command works fine used by root but act just like the WUI when used by foreman user.
So WUI and rake are consistent.
OS : Debian 6
Installation GIT & deb nightly (same behaviour)
Run with passenger with user foreman.
To solve the problem, you should add in your settings the following line :
:puppetconfdir: /etc/puppet/puppet.conf (adapt to your real path to puppet.conf)
and it should work properly.
To solve the problem, you should add in your settings the following line :
:puppetconfdir: /etc/puppet/puppet.conf (adapt to your real path to puppet.conf)
and it should work properly.
- Status changed from New to Closed
Actually
:puppet_conf: /etc/puppet/puppet.conf
is the right way to configure it.
Also available in: Atom
PDF