Bug #9385

Case sensitive .pp files

Added by Tyler Parsons 9 months ago. Updated 5 months ago.

Status:Accepted Start date:09/08/2011
Priority:Normal Due date:
Assignee:Nick Fagerlund % Done:

0%

Category:documentation
Target version:2.7.x
Affected Puppet version:2.7.3 Branch:
Keywords:
Votes: 1

Description

We have found that the auto import feature of puppet 2.7.3 does not properly import classes when the file name contains mixed case. However this problem did not exist on puppet 2.6.9/2.6.x.

Note: The class name was not changed between tests class d0::mount_RunII_home {

Before File Name Change:

...
debug: importing '/puppet_path/zones/d0/manifests/init.pp' in environment production
Could not find class d0::mount_RunII_home for hostname1 at /puppet_path/manifests/nodes.d/hostname1.pp:2 on node hostname1
...

After File Name Change:

...
debug: importing '/puppet_path/d0/manifests/mount_runii_home.pp' in environment production
debug: Automatically imported d0::mount_runii_home from d0/mount_runii_home into production
...

From what I’m able to observe it appears the class name is being lcased. So the auto import logic is looking file a file name that matches mount_runii_home rather than mount_RunII_home.

I was able to find this documented on the website ( http://docs.puppetlabs.com/guides/faq.html )

...
Class names can contain lowercase letters, numbers, and underscores, and should begin with a lowercase letter. “::” can be used as a namespace separator.
...

Is this a new policy or something that is now being enforced before?

History

Updated by James Turnbull 7 months ago

  • Category set to documentation
  • Status changed from Unreviewed to Accepted
  • Assignee set to Nick Fagerlund

It’s now being enforced. Passed to Nick to document.

Also available in: Atom PDF