1

I did a Puppet/MCollective setup using four nodes.

  # mco ping
  Node-010.test.com                   time=107.58 ms
  Node-003.test.com                   time=110.68 ms
  Node-009.test.com                   time=114.42 ms
  Node-002.test.com                   time=116.49 ms

#mco puppet runonce works fine but is not applying the manifests .

  # mco puppet runonce
  * [ ============================================================> ] 4 / 4
  Finished processing 4 / 4 hosts in 151.61 ms

My manifests configuration is as follows:

   # puppet master --configprint manifest
   /etc/puppetlabs/code/environments/production/manifests

My Site.pp is as follows

  # cat /etc/puppetlabs/code/environments/production/manifests/site.pp
node default {
}
node 'Node-002.test.com'{
file {"/tmp/helloworld.txt":
      ensure => file,
      owner  => 'root',
      group  => 'root',
      mode   => '0644',
      content =>" Hi ",
   }
  }

Site.pp is not getting applied .

From the log file , it seems it is reading from cache and applying for nodes for which no rule exists .

  ` # tail -f /var/log/puppetlabs/puppetserver/puppetserver.log
2016-06-21 20:21:06,355 INFO  [qtp1367105977-65] [puppet-server] Puppet    Compiled catalog for Node-009.test.com in environment qa in 0.04 seconds
2016-06-21 20:21:08,223 INFO  [qtp1367105977-65] [puppet-server] Puppet Caching node for Node-002.test.com
2016-06-21 20:21:08,618 INFO  [qtp1367105977-69] [puppet-server] Puppet Caching node for Node-002.test.com 

Am i hitting some bug or missing some configuration item ?

  • Try to restart the puppetmaster and see if this helps... – gf_ Jun 21 '16 at 10:43
  • Restarted puppetserver many a times but no help – Zama Ques Jun 21 '16 at 10:52
  • 1
    The agent asked for the environment qa, whereas you showed site.pp of environment production. – gf_ Jun 21 '16 at 12:20
1

As per the comments: The agent asked for the environment qa, whereas you showed site.pp of the environment production. So, better double check the environments on both sides, master and agent. :)

  • How can I change environment from production to qa in puppet Server ? – Zama Ques Jun 22 '16 at 8:25
  • 1
    @ZamaQues Depends on the version you're using. Normally, with recent / current versions, the puppetmaster will just serve the environment the agent asks for. – gf_ Jun 22 '16 at 10:04
  • Thanks. Versions are as follows puppetserver-2.3.1 , puppet-agent-1.3.5 – Zama Ques Jun 22 '16 at 10:11
  • Verified it is serving from the environment the agent is asking. Thanks for all your help – Zama Ques Jun 22 '16 at 11:10
  • @ZamaQues Glad to help, good luck! – gf_ Jun 22 '16 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.