Bug #1159

Class import behaviour not consistent "rake puppet:import:puppet_classes" x "UI"

Added by Marcello de Sousa about 6 years ago. Updated over 4 years ago.

Status:Closed
Priority:Normal
Assigned To:Ohad Levy
Category:Importers
Target version:0.4
Difficulty: Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-

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!).


Related issues

Related to Foreman - Bug #562: rake task of import of classes and environments in batch ... Closed 01/03/2011
Related to Foreman - Refactor #100: Store Foreman Settings in the database and allow configur... Closed 11/30/2009
Related to Foreman - Bug #1068: Module path not guessed correctly with puppet 2.7 Closed 07/26/2011
Related to Foreman - Bug #1255: Error: "Unable to find directory /etc/puppet/modules in e... Closed 10/24/2011

History

#1 Updated by Ohad Levy about 6 years ago

  • Target version deleted (0.4)

#2 Updated by Ohad Levy almost 6 years ago

  • Target version set to 0.4

#3 Updated by Olivier Le Cam almost 6 years ago

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

#4 Updated by Olivier Le Cam almost 6 years ago

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

#5 Updated by Ashley Penney almost 6 years ago

Same for me:

puppet-server-2.7.5-1.el6.noarch

puppet.conf:

[main]
  1. Where Puppet stores dynamic and growing data.
  2. The default value is '/var/puppet'.
    vardir = /var/lib/puppet
  1. The Puppet log directory.
  2. The default value is '$vardir/log'.
    logdir = /var/log/puppet
  1. Where Puppet PID files are kept.
  2. The default value is '$vardir/run'.
    rundir = /var/run/puppet
  1. Where SSL certificates are kept.
  2. The default value is '$confdir/ssl'.
    ssldir = $vardir/ssl

environment = development

pluginsync = true
factpath = $vardir/lib/facter
report = true

[agent]
  1. The file in which puppetd stores a list of the classes
  2. associated with the retrieved configuratiion. Can be loaded in
  3. the separate ``puppet`` executable using the ``--loadclasses``
  4. option.
  5. The default value is '$confdir/classes.txt'.
    classfile = $vardir/classes.txt
  1. Where puppetd caches the local configuration. An
  2. extension indicating the cache format is added automatically.
  3. The default value is '$confdir/localconfig'.
    localconfig = $vardir/localconfig
  1. 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

#6 Updated by Romain Vrignaud almost 6 years ago

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.

#7 Updated by Romain Vrignaud almost 6 years ago

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.

#8 Updated by Romain Vrignaud almost 6 years ago

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.

#9 Updated by Romain Vrignaud almost 6 years ago

  • Status changed from New to Closed

#10 Updated by Christoph Witzany over 4 years ago

Actually

:puppet_conf: /etc/puppet/puppet.conf

is the right way to configure it.

Also available in: Atom PDF