PE 3.1: mco find -C Result is Not Consistent With PE Console
I'm trying to use mcollective to get a list of nodes that have a certain Puppet class assigned to them. According to the Puppet Enterprise Orchestration docs, the
-C flag for the
mco command should work (emphasis is mine):
Classes are the Puppet classes that are assigned to a node. This includes classes assigned in the console, assigned via Hiera, declared in site.pp, or declared indirectly by another class. Use the -C or --with-class option with a class name to filter on classes.
What I'm finding is that when I use mcollective to query nodes with the
-C, the results do not always match what is specified in the Puppet Enterprise Console.
Question: How/When does mcollective "know" when the classes assigned to a node via the Puppet Enterprise Console?
Steps to Reproduce Using the Puppet Enterprise Console
- I assign a Puppet class called apcs to a node called servicing.
- I assign a puppet class called akamai to a node called logscraper.
At some point (unfortunately I'm not really sure what the trigger is; hence this question), mcollective "knows" that apcs is assigned to the servicing node and akamai is assigned to the logscraper node.
- I assign the apcs class to the node called logscraper.
At this point, I have the following (shown in the Puppet Enterprise Console):
- the servicing node has the apcs class assigned to it.
- the logscraper node has the apcs AND akamai class assigned to it.
mco ping -C akamai should return logscraper.
mco ping -C apcs should return servicing and logscraper.
mco ping -C akamai returns logscraper.
mco ping -C apcs returns servicing.
I tried running the
/opt/puppet/sbin/refresh-mcollective-metadata cron job, but that didn't help.