Running “sudo chef-client” does not update with latest version of cookbook

chef

Here's the situation:

I have a recipe that I've been working on to install monit and install a custom monit configuration. That configuration has changed the past couple of days.

I have a chef server and a chef node. The server has the most up-to-date version the recipe I've mentioned. When I run 'sudo chef-client', it seems to run the usual statements, but when I check on the monit configuration, it's an old version, not the latest.

When I use the web UI for my chef server, I can see that it has the latest version of my recipe.

How can I go about debugging this?

Best Answer

Your node's environment definition may have a cookbook constraint. Check the environment for something like this:

cookbook "monit", "= 1.3.5"

You might have some confusion with the actual cookbook contents that you pushed up to chef. You can pull down a specific version directly from chef and make sure it has everything you want by doing knife cookbook download monit. It will prompt to select a version and then you can fish through the contents to see if it is what you thought it was.