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 raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar added subscribers: hashar, Andrew.
hashar set Security to None.
hashar updated the task description. (Show Details)

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.

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

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 triaged this task as High priority.