Puppet: System Administration Automated

Support

Ticket #1183 (assigned defect)

Opened 6 months ago

Last modified 5 months ago

some settings are not environment aware, e.g; manifest

Reported by: ehisey Assigned to: luke (accepted)
Priority: high Milestone: 0.24.5
Component: settings Version: 0.24.4
Severity: normal Keywords: environment settings
Cc: Triage Stage: Needs more info
Attached Patches: None Complexity: Unknown

Description

When using puppetd ---environment=development --configprint <config name> the --environment variable is getting ignored. As you can see below

Complete puppet.conf:

[main]
   vardir = /var/lib/puppet
   logdir = /var/log/puppet
   rundir = /var/run/puppet
   ssldir = $vardir/ssl
   environment = production
  manifest = $manifestdir/site.pp

[puppetmasterd]
    environments=production,development

[puppetd]
   classfile = $vardir/classes.txt
   localconfig = $vardir/localconfig
   environments=production,development

[production]
  manifest = /srv/puppet/production/manifests/site.pp

[development]
   manifest = /srv/puppet/development/manifests/site.pp

From default settings

# puppetd --configprint manifest
/etc/puppet/manifests/site.pp

Using enviroments:

# puppetd --environment=development --configprint manifest
/etc/puppet/manifests/site.pp


# puppetd --environment=production --configprint manifest
/etc/puppet/manifests/site.pp

Change History

04/09/08 23:56:34 changed by Fujin

  • status changed from new to assigned.
  • component changed from executables to library.
  • summary changed from configprint option does not regonize environments to some settings are not environment aware, e.g; manifest.
  • owner changed from community to Fujin.
  • milestone set to unplanned.
  • keywords changed from environment configprint to environment settings.
  • stage changed from Unreviewed to Needs more info.

Accepted, replicated;

puppet.conf:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
factpath=/var/lib/puppet/lib/facter
rundir=/var/run/puppet
environments=development,testing

[testing]
manifest=/etc/puppet/manifests/site-testing.pp

[development]
manifest=/etc/puppet/manifests/site-dev.pp
root@junglist (branch: master) /etc/puppet# puppetd --environment testing -t --configprint environment
testing
root@junglist (branch: master) /etc/puppet# puppetd --environment testing -t --configprint manifest
/etc/puppet/manifests/site.pp

(wrong)
root@junglist (branch: master) /etc/puppet# puppetd --environment development -t --configprint environment
development
root@junglist (branch: master) /etc/puppet# puppetd --environment development -t --configprint manifest
/etc/puppet/manifests/site.pp

(also wrong)

Expected output is /etc/puppet/manifests/site-testing.pp and site-dev.pp respectively.

04/10/08 21:55:48 changed by ehisey

The manifest setting does work correctly when puppetd is actually running but it is reported wrong by configprint. The manifestdir and templatedir settings on the other hand do appear to be unaware of enviroments.

Templatedir example:

[main]
    vardir = /var/lib/puppet
    logdir = /var/log/puppet
    rundir = /var/run/puppet
    ssldir = $vardir/ssl
    templatedir = /srv/puppet/
    environment = production

[puppetmasterd]
     environments = production,development

[puppetd]
    environments = production,development

[production]
   tempaltedir = /srv/puppet/production/manifests/templates

[development]
   templatedir =/srv/puppet/development/imanifests/templates

Testing for prodcution is wrong.

# puppetd --environment production --configprint templatedir 
/srv/puppet/

Testing for development is wrong.

# puppetd --environment development --configprint templatedir
/srv/puppet/

And for the templatedir setting the runtime evaluation is also wrong.

# puppetd --noop --environment development --test
notice: Ignoring cache
err: Could not retrieve catalog: Could not find template puppet_conf.erb at /srv/puppet/development/manifests/classes/puppet.pp:14 on node pixie.unix.eng.ua.edu
warning: Not using cache on failed catalog

line 14 of puppet.pp

content => template("puppet_conf.erb"),

Listing of templates dir:

# ls /srv/puppet/development/manifests/templates/
cron.erb  puppet_conf.erb  tftp.erb  updatedbconf.erb  yum_conf.erb

Manifest example:

Using the same puppet.conf as the orginal bug report, when you run the configprint you get:

# puppetd --environment development --configprint manifestdir
/etc/puppet/manifests

which is incorrect. The /etc/puppet/manifests dir is actually empty,

# ls /etc/puppet/manifests/
# 

but when you run puppetd you get:

# puppetd --environment development --noop --test
notice: Ignoring cache
info: Caching catalog at /var/lib/puppet/localconfig.yaml
notice: Starting catalog run
notice: Finished catalog run in 11.11 seconds

And puppet finds a site.pp to evaluate.

Evan

04/24/08 07:25:45 changed by luke

  • component changed from library to settings.

05/12/08 23:49:35 changed by luke

  • milestone changed from unplanned to 0.24.5.

05/13/08 06:58:33 changed by Fujin

  • owner changed from Fujin to community.
  • status changed from assigned to new.

Anyone feel like tackling this for 0.24.5?

05/16/08 06:19:34 changed by luke

  • owner changed from community to luke.
  • status changed from new to assigned.

05/16/08 06:20:53 changed by luke

  • priority changed from normal to high.