The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #3171

Multiple environments main manifest not working

Added by Enrica Patacconi almost 5 years ago. Updated over 4 years ago.

Status:Needs More InformationStart date:02/09/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:plumbing
Target version:-
Affected Puppet version:0.25.4 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

I run puppetmasterd and puppetd on a SLES 10SP2.

I have three different environments: bootstrap, staging, production

this is part of the puppet.conf on the master:

[puppetmasterd]

modulepath          = /etc/puppet/modules
environments        = bootstrap,staging,production
environment         = bootstrap

[bootstrap]

modulepath          = /etc/puppet/bootstrap/modules:/etc/puppet/modules
manifest            = /etc/puppet/bootstrap/site.pp

[staging]

modulepath          = /etc/puppet/staging/modules:/etc/puppet/modules
manifest            = /etc/puppet/staging/site.pp

[production]

modulepath          = /etc/puppet/production/modules:/etc/puppet/modules
manifest            = /etc/puppet/production/site.pp

this is [puppetd] section in puppet.conf on the client [puppetd]

classfile           = $vardir/classes.txt
localconfig         = $vardir/localconfig
environment         = bootstrap

in /etc/puppet/bootstrap/site.pp I have the following: import “/etc/puppet/nodes/default”

in /etc/puppet/site.pp (the main site.pp), /etc/puppet/staging/site.pp and /etc/puppet/production/site.pp I have the following import “/etc/puppet/nodes/*”

The problem is that if I run puppet from a node called NODE1, if a /etc/puppet/nodes/node1 file exists, although specifying bootstrap as environment, it will always refer to /etc/puppet/nodes/NODE1 bypassing default (as specified in the bootstrap’s site.pp)

I even tried to force it at command line with —environment=bootstrap but nothing.

I also found out that puppet seems to ignore the environment’s main manifest (in my case /etc/puppet/bootstrap/site.pp) and always refer to the main one (/etc/puppet/site.pp).

Does anybody else have the same issue?

Thanks.

History

#1 Updated by James Turnbull over 4 years ago

  • Category set to plumbing
  • Status changed from Unreviewed to Needs More Information

Can I just confirm some details?

  1. Is this 0.25.4?
  2. What happens with a node Puppet doesn’t know about?
  3. Can you provide some logs from master and client showing a run that has the incorrect behaviour?

Thanks!

Also available in: Atom PDF