Ask Your Question

Puppet agent module old version, not using same version as master

asked 2016-10-06 07:03:01 -0600

gagan93 gravatar image

Hey people, I am a puppet beginner. We have a puppet module written by somebody else some years ago and I am maintaining it. It also has a custom type defined. Basically the problem is :

  1. Custom type is written in ruby and has a code error. I've fixed the error and built the module on master.
  2. The updated module was installed on master (removed old one, installed this one, even upgraded version number).
  3. Somehow, the puppet agent is still trying to use the older version of module which is installed inside its /var/lib/puppet directory. I cannot change the code as puppet reverts it on next execution.
  4. Even if I delete the entire /var/lib/puppet/lib directory, it regenerates the code structure which is of the older version.

My questions are :

  1. Do I need to mention somewhere for the agent to use latest version of module ? Can't master and agent sync for module version ?
  2. Why is it picking a different (older) version ? Is agent always downloading code from puppet forge ?

Note : I am using Modulefile instead of metadata.json which shows deprecation warning but I hope that is not causing it. Once the issue is fixed, I'll switch to metadata.json too.

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-10-06 11:53:59 -0600

DarylW gravatar image

First step, you need to restart the puppetmaster to clear it's cache. I've run into that same bug before.

Steps I went through:

  • add function to module
  • test function
  • fix problem
  • update function
  • test results in old behavior
  • restart master
  • test results in new behavior
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-10-06 07:03:01 -0600

Seen: 93 times

Last updated: Oct 06 '16