Ask Your Question

Error 400 on server: could not find class

asked 2014-02-18 18:50:06 -0600

UBPClaw gravatar image

I seem to have really intermittent issues with my agents. They will connect until I make a change to the manifest then I start getting errors again.

I have a custom class called m1::defaults, it calls the ntp module I installed from the forge. Im still learning so it isnt particularly advanced yet, but beyond the include ntp statement it configures our custom in house repo based on OS version. I run puppet parser validate m1defaults.pp and it returns no errors. I run puppet apply m1defaults.pp andf it says compiled catalogue in environment production. I ... (more)

edit retag flag offensive close merge delete



Could you paste the actual code ?

golja gravatar imagegolja ( 2014-02-18 21:59:56 -0600 )edit

You should provide a code snippet and the exact errors/warnings provided by Puppet.

giavac gravatar imagegiavac ( 2014-02-19 04:16:36 -0600 )edit

Is the module path correctly set in your puppet.conf? Otherwise, from where it called? Do you have a "m1" class that includes "defaults" or "m1::defaults", for instance? (It ...(more)

robrwo gravatar imagerobrwo ( 2014-02-19 10:08:05 -0600 )edit

The module path is correct, I have not change it from the default. Output from running puppet config print modulepath is /etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules ...(more)

UBPClaw gravatar imageUBPClaw ( 2014-02-19 11:06:29 -0600 )edit

Puppet apply m1.defaults.pp returns the following Notice: Compiled catalog for powc-pupt-01-pv in environment production in 0.09 seconds Notice: Finished catalog run in 0.34 seconds

UBPClaw gravatar imageUBPClaw ( 2014-02-19 11:06:46 -0600 )edit

2 Answers

Sort by » oldest newest most voted

answered 2014-02-19 11:38:12 -0600

robrwo gravatar image

updated 2014-02-19 11:39:29 -0600

From my comment above, the manifest files should be in the correct location.

Underscores aren't illegal in file or class names, but your class names should correspond with file names. class "foo" should be in modules/foo/manifests/init.pp, "foo::bar" in modules/foo/manifests/bar.pp, and "foo::bar::baz" in modules/foo/manifests/bar/baz.pp.

edit flag offensive delete link more

answered 2014-02-19 14:59:25 -0600

lavaman gravatar image

Puppet finds classes based on a specific file/directory format.

Basically, this is failing because your class is not in a file called modules/m1/manifests/defaults.pp

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-02-18 18:50:06 -0600

Seen: 2,094 times

Last updated: Feb 19 '14