Ask Your Question
1

node manifest cant find class

asked 2014-01-15 12:03:59 -0500

javatestcase gravatar image

updated 2014-01-15 18:17:07 -0500

EDIT: I was able to see that puppet knows about the module with this command. I wonder what the (???) is?

C:\ProgramData\PuppetLabs\puppet\etc\manifests>puppet module list
C:/ProgramData/PuppetLabs/puppet/etc/modules
+-- jboss (???)

I have an include in my node.pp which is on the agent at.

When I run "puppet apply site.pp --modulepath=C:\ProgramData\PuppetLabs\puppet\etc\manifests\modules" (with and without modulepath is same behavior)

I get error messages:

Error: Could not find class jboss::jboss for mePc.fqn on node mePc.fqn

I've tried every variation I can think of, with ... (more)

edit retag flag offensive close merge delete

Comments

1

The (???) is usually where the module version number would be. If all the modules were created without a Module File then puppet would have no way of determining the version number.

martezr gravatar imagemartezr ( 2014-01-15 16:13:10 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-01-15 12:46:55 -0500

Since the module is using the init.pp file for all the code the second "jboss" can be removed from the node.pp file and the second "jboss" can be removed from the class in the init.pp manifest based upon the following remark from the module fundamentals page.

"init.pp is special and always contains a class with the same name as the module."

The following code should work.

C:\ProgramData\PuppetLabs\puppet\etc\manifests\node.pp

node 'mePc.fqn' { include jboss}

C:\ProgramData\PuppetLabs\puppet\etc\manifests\modules\jboss\mainfests\init.pp

class jboss { service { 'JBAS50SVC' : ensure => "running", } }

edit flag offensive delete link more

Comments

thank you for your answer. I just tried that, same behavior, with the name jboss rather than jboss::jboss C:\ProgramData\PuppetLabs\puppet\etc\manifests>puppet apply site.pp Error ...(more)

javatestcase gravatar imagejavatestcase ( 2014-01-15 12:59:23 -0500 )edit

Is there an entry in your site.pp file to import the node.pp file?

martezr gravatar imagemartezr ( 2014-01-15 13:21:20 -0500 )edit

yes import 'node.pp' is the only line in my site.pp right now. Good question though, made me try import 'jboss.pp', which got an error too.

javatestcase gravatar imagejavatestcase ( 2014-01-15 13:25:05 -0500 )edit

thanks for confirming that everything was set up properly... In the end, it was a spelling mistake. \jboss\mainfests\init.pp - manifests is misspelled. D'oh.

javatestcase gravatar imagejavatestcase ( 2014-01-15 16:21:23 -0500 )edit
0

answered 2014-01-15 16:27:26 -0500

javatestcase gravatar image

updated 2014-01-15 18:17:30 -0500

In case anyone has a similar issue. I was able to troubleshoot by running "puppet module" commands.

C:\ProgramData\PuppetLabs\puppet\etc\manifests>puppet module list
C:/ProgramData/PuppetLabs/puppet/etc/modules
+-- jboss (???)

Which told me that Puppet was aware the module should be there. Then running "puppet module build jboss", it threw an error message that it could not find the "root" of the module. I suppose that means it cannot navigate to init.pp. In my case it was due to a spelling error.

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

1 follower

Stats

Asked: 2014-01-15 12:03:59 -0500

Seen: 699 times

Last updated: Jan 15 '14