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

Bug #10207

puppet apply ignores multiple directories as parameters

Added by Tom De Vylder about 3 years ago. Updated almost 2 years ago.

Status:AcceptedStart date:10/21/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-Estimated time:1.00 hour
Target version:-
Affected Puppet version: Branch:
Keywords:apply
argumenterror

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

This works fine:

# cat /etc/puppet/puppet.conf
[main]
...
modulepath=/etc/puppet/production/modules:/etc/puppet/common/modules
templatedir=/etc/puppet/production/templates:/etc/puppet/common/templates

# puppet agent --test
...

This doesn’t work:

puppet apply init.pp --debug \
  --environment production \
  --manifest /tmp/init.pp \
  --modulepath /tmp/puppet/production/modules:/tmp/puppet/common/modules \
  --templatedir /tmp/puppet/production/templates:/tmp/puppet/common/templates

(and a variety of notations, with or without (single/double) quotes, space instead of colon, etc.)

And dies with the following error:

info: Loading facts in ...
info: Loading facts in ...

Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class company at /tmp/init.pp:6 on node node.example.org

Anything inside the common directories (after the colon) is ignored when using puppet apply. Thus resulting in the above error.

Probably not very useful but for the sake of completeness:

# cat init.pp
class { 'company': } # common dir
class { 'mysql': }   # production dir

Class['company'] ->
Class['mysql']

Tested on puppet versions: 2.6.7; 2.7.1; 2.7.2; 2.7.4 OS: Debian 6, clean netinstall

If anyone needs more information please let me know.


Related issues

Related to Puppet - Feature #10651: Allow the default modulepath in puppet.config to be augme... Accepted 11/08/2011

History

#1 Updated by Tom De Vylder about 3 years ago

Forgot to mention the above error also occurs when using —config.

#2 Updated by Kelsey Hightower about 3 years ago

I am going to try and reproduce this on my setup.

#3 Updated by Kelsey Hightower about 3 years ago

  • Due date set to 11/18/2011
  • Status changed from Unreviewed to Investigating
  • Assignee set to Kelsey Hightower
  • Estimated time set to 1.00

#4 Updated by Kelsey Hightower about 3 years ago

  • Status changed from Investigating to In Topic Branch Pending Review
  • Target version set to 2.7.x
  • % Done changed from 0 to 100
  • Branch set to https://github.com/puppetlabs/puppet/pull/227

Pending Review

Pull request here: Pull Request 227

#5 Updated by Kelsey Hightower about 3 years ago

  • Status changed from In Topic Branch Pending Review to Code Insufficient
  • Branch deleted (https://github.com/puppetlabs/puppet/pull/227)

Wrong ticket

#6 Updated by Kelsey Hightower about 3 years ago

  • Due date deleted (11/18/2011)
  • % Done changed from 100 to 0

#7 Updated by Nick Lewis about 3 years ago

  • Status changed from Code Insufficient to Accepted

#8 Updated by Kelsey Hightower over 2 years ago

  • Assignee deleted (Kelsey Hightower)

#9 Updated by Anonymous almost 2 years ago

  • Target version deleted (2.7.x)

Also available in: Atom PDF