Ask Your Question
0

Include is not working which is defined in nodes.pp

asked 2015-04-16 11:42:05 -0500

updated 2015-04-19 07:19:41 -0500

Hi Team,

I am facing one strange issue - I've installed puppet client on two server and configured it properly On first puppet agent i verified that its puppet configured everything perfectly according to the manifests.

Till yesterday it was working fine but suddenly today I am facing uncommon error that its failing for all the classes which includes in node.spp

The only issue occurred when i was trying to install pupept client on one another server where the timezone was different. So we updated the time through ntpdate -s <ntpservername> on all the servers including the first puppet agent where puppet was working fine so that everything will get synchronized with same timezone. And then i was able to sign the client certificate for second client from puppet master server.

I don't know what has happened and i am 90% sure that ntp shouldn't have caused this issue but facing this issue :| Do you think ntp should have caused any issue ??

When i removed the include part from nodes.pp, its working fine and finishing the catalogue successfully

I am not using modules convention whereas using site.pp to define all the classes, definitions,etc and trust me it was working few days ago

Also I am using the same class name as file name (pfb the example)


[root@10 classes]# more appusers.pp

 class appusers {
    # minimum required.
    group { "weblogic":
    ensure => "present",
     }

Any clue will be really helpful as i am stuck with it :|

Please find the below error :

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find **classes** appusers, appserver, weblogic, sudo 
at /etc/puppet/manifests/nodes.pp:25 on node 10.71.32.90
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
edit retag flag offensive close merge delete

Comments

You can include the all classes in /etc/manifests/site.pp. Not include in your modules.

akshay gravatar imageakshay ( 2015-04-17 06:27:12 -0500 )edit

I would check the following: (1) make sure nothing has changed in the puppet master's `puppet.conf`, such as the `modulepath` (2) make sure the permissions are correct on `/etc/puppet/modules` and on the directories and subdirectories of `.../modules/appusers`, `.../modules/appserver`, etc.

JohnsonEarls gravatar imageJohnsonEarls ( 2015-04-17 06:57:47 -0500 )edit

In your puppet.conf file you mention the path of your module i.e modulepath=/etc/puppet/modules And the modulename is same as classname and then include in your site.pp file.

akshay gravatar imageakshay ( 2015-04-17 07:13:45 -0500 )edit

Thanks guys for sparing the time and helping me. Actually all the files are unchanged and permissions are correct as far as i know. The only issue occurred when i was trying to install client on one server where the timezone was different.

scm_questor gravatar imagescm_questor ( 2015-04-17 11:03:53 -0500 )edit

So we updated the time through ntpdate -s <ntpservername> and then i was able to sign the client certificate from server. I don't know what has happened and i am 90% sure that ntp shouldn't have caused this issue but facing the same issue :| Do you think ntp should have caused any issue or is there

scm_questor gravatar imagescm_questor ( 2015-04-17 11:04:02 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-04-18 13:55:14 -0500

Hi All, I reinstalled the Puppet Master and that has resolved the issue :D I tried several things but nothing was working so had to reinstall it. It seems that ntp setting might have caused the issue (again not 100% sure) - Thanks for all your help

edit flag offensive delete link more
0

answered 2015-04-17 16:49:55 -0500

GregLarkin gravatar image

Make sure you follow these instructions exactly for naming your module files and the classes contained within them: https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html#module-layout

I'm 99% sure that if you do that, the errors will disappear. You could possibly have the wrong name for your classes inside the .pp files, even if the .pp files are located in the correct places.

edit flag offensive delete link more

Comments

Thanks Greg, I am using the same class name as the file name and the only issue with the configuration is that it was working few days ago so i feels that its not an issue of how we are using modules - i've updated the question with all the details - please could you have a look - thanks again

scm_questor gravatar imagescm_questor ( 2015-04-18 10:50:49 -0500 )edit
1

I would strongly advise updating your code and moving your files around to adhere to the module layout specification that I linked to above. The import keyword is deprecated, and it will be removed from the language in Puppet 4 (just released). Your code should work if you do that.

GregLarkin gravatar imageGregLarkin ( 2015-04-18 15:41:51 -0500 )edit

Thanks Greg, sure will do and will let you know in case of any issue.

scm_questor gravatar imagescm_questor ( 2015-04-19 07:18:50 -0500 )edit

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: 2015-04-16 11:42:05 -0500

Seen: 494 times

Last updated: Apr 19 '15