Page MenuHomePhabricator

puppet yields: Could not find declared class ::nodepool at /etc/puppet/manifests/role/nodepool.pp:25
Closed, ResolvedPublic

Description

Could not find declared class ::nodepool at /etc/puppet/manifests/role/nodepool.pp:25 on node labnodepool1001.eqiad.wmnet

The pseudo code being:

class role::nodepool {
    class { '::nodepool':
    }
}

::nodepool should refers to the module modules/nodepool/manifests/init.pp. That makes puppet unhappy / unable find the module :-/

Have to reproduce it on labs and see what happens.

Event Timeline

hashar created this task.Jul 9 2015, 10:00 PM
hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar added subscribers: hashar, Andrew.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 9 2015, 10:00 PM
hashar updated the task description. (Show Details)Jul 10 2015, 7:53 AM
hashar set Security to None.
hashar updated the task description. (Show Details)
Joe added a subscriber: Joe.Jul 10 2015, 8:16 AM

so, creating a simple test file

class role::nodepool {                                                                                                                                                                                            
    class { '::nodepool': }                                                                                                                                                                                       
}                                                                                                                                                                                                                 
                                                                                                                                                                                                                  
node 'work.local' {                                                                                                                                                                                              
    include role::nodepool                                                                                                                                                                                        
}

And running this with

puppet apply --modulepath=$WMFPUPPETDIR/modules --noop test.pp

the class gets found correctly.

Joe claimed this task.Jul 10 2015, 8:52 AM

Change 224039 had a related patch set uploaded (by Giuseppe Lavagetto):
role::nodepool: use secret()

https://gerrit.wikimedia.org/r/224039

Change 224039 merged by Giuseppe Lavagetto:
role::nodepool: use secret()

https://gerrit.wikimedia.org/r/224039

Restricted Application added a subscriber: Matanya. · View Herald TranscriptJul 10 2015, 10:29 AM
Joe added a comment.Jul 10 2015, 10:30 AM

Problem solved in production, now labnodepool reports

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Must pass jenkins_ssh_public_key to Class[Nodepool] at /etc/puppet/manifests/role/nodepool.pp:25 on node labnodepool1001.eqiad.wmnet
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Now fixing labs/private as well

Change 224045 had a related patch set uploaded (by Giuseppe Lavagetto):
Moving the nodepool mock private data to the appropriate place

https://gerrit.wikimedia.org/r/224045

Change 224045 merged by Giuseppe Lavagetto:
Moving the nodepool mock private data to the appropriate place

https://gerrit.wikimedia.org/r/224045

Joe closed this task as Resolved.Jul 10 2015, 10:43 AM
Joe triaged this task as High priority.