Project

General

Profile

Actions

Bug #1159

closed

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

Added by Marcello de Sousa over 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Importers
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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 4 (0 open4 closed)

Related to Foreman - Bug #562: rake task of import of classes and environments in batch mode does not work reliablyClosedOhad Levy01/03/2011Actions
Related to Foreman - Refactor #100: Store Foreman Settings in the database and allow configure it using the WebUI/APIClosedOhad Levy11/30/2009Actions
Related to Foreman - Bug #1068: Module path not guessed correctly with puppet 2.7Closed07/26/2011Actions
Related to Foreman - Bug #1255: Error: "Unable to find directory /etc/puppet/modules in environment production"Closed10/24/2011Actions
Actions #1

Updated by Ohad Levy over 12 years ago

  • Target version deleted (0.4)
Actions #2

Updated by Ohad Levy over 12 years ago

  • Target version set to 0.4
Actions #3

Updated by Olivier Le Cam over 12 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

Actions #4

Updated by Olivier Le Cam over 12 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

Actions #5

Updated by Ashley Penney over 12 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

Actions #6

Updated by Romain Vrignaud over 12 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.

Actions #7

Updated by Romain Vrignaud over 12 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.

Actions #8

Updated by Romain Vrignaud over 12 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.

Actions #9

Updated by Romain Vrignaud over 12 years ago

  • Status changed from New to Closed
Actions #10

Updated by Christoph Witzany about 11 years ago

Actually

:puppet_conf: /etc/puppet/puppet.conf

is the right way to configure it.

Actions

Also available in: Atom PDF