Node Not Downloading Latest Cookbook Version


#1

We’re running Chef Server 12.2.0 with most nodes running chef-client 12.5.1. I recently noticed new version of our baseline wrapper cookbook (version 0.4.5) is not downloading onto the appropriate nodes. If the node has the baseline wrapper cookbook directly associated with it (e.g. not through a role or environment), the node downloads the latest copy of the cookbook successfully. If the node has the baseline wrapper cookbook indirectly associated with it (through a role), then the node downloads v 0.4.2 instead.

The odd thing is, there’s no version constraints that would prevent these nodes from downloading the latest version of the cookbook through their roles. Here’s the dependency data for one of the wrapper cookbooks that indirectly calls our baseline cookbook. I’ve double-checked that all of our wrapper cookbooks are like this:

  "dependencies": {
    "nfs": "= 2.2.6",
    "awscli": "= 1.1.2",
    "baseline-cookbook": ">= 0.0.0",
    "ssh_known_hosts": "= 2.0.0",
    "apt": "= 2.9.2"
  },

Troubleshooting steps so far:

  • I deleted v 0.4.2 of the cookbook to see if the nodes would pick up the newer cookbook version, that didn’t work.

  • I deleted v 0.4.3 of the cookbook to see if there was some kind of bug preventing that cookbook from being used. That didn’t work.

  • I deleted the cached version of the baseline wrapper cookbook on the node (under /var/chef/cache/cookbooks) and re-ran chef-client. That didn’t work.

I did notice that the newer versions of the cookbook (that the node refuses to use) have all the cookbook version dependencies in metadata.rb instead of Berksfile, but our custom wrapper cookbooks are still referenced in Berksfile like so:

source 'https://supermarket.chef.io'

metadata

cookbook 'baseline-cookbook', git: 'git@github.com:jcderose/baseline-cookbook.git'

Perhaps the Chef server is not including/interpreting these changes? I don’t see the Berksfile anywhere in /var/chef/cache/cookbooks.