Kitchen.yml only runs 'default' recipe


#1

In my .kitchen.yml, this works fine at ‘kitchen converge’:

suites:

  • name: default
    run_list:
    • recipe[one::default]

…so does:

suites:

  • name: default
    run_list:
    • recipe[one]
    • recipe[two::default]

…but if I write:

suites:

  • name: default
    run_list:
    • recipe[one]
    • recipe[two::something-other-than-default]

…then I get:

   ================================================================================
   Recipe Compile Error
   ================================================================================
   
   Chef::Exceptions::RecipeNotFound
   --------------------------------
   could not find recipe something-other-than-default for cookbook two

Its definitely present, perms correct… so nothing like that is an issue. And, I can see that the recipe I’m specifying is definitely present on the chef server itself.

Note that when starting the converge, I do see:

   Starting Chef Client, version 12.17.44
   resolving cookbooks for run list: ["one::default", "two::something-other-than-default"]
   Synchronizing Cookbooks:
     - one (1.1.0)
     - two (1.1.0)
     - chef-yum-docker (2.1.0)
     - yum (4.1.0)
     - compat_resource (12.16.2)
     - chef_handler (2.1.0)
     - chef-client (7.0.3)
     - logrotate (2.1.0)
     - windows (2.1.1)
     - ohai (4.2.3)
     - cron (3.0.0)

===
Berksfile:
source :chef_server

cookbook 'one’
cookbook 'two’
cookbook 'chef-yum-docker’
cookbook ‘yum’

metadata

===

metadata.rb:

depends ‘chef-yum-docker’, '> 2.0.0’
depends 'yum’
depends 'one’
depends ‘two’

===

Other info:
chef --version
Chef Development Kit Version: 1.1.16
chef-client version: 12.17.44
delivery version: master (83358fb62c0f711c70ad5a81030a6cae4017f103)
berks version: 5.3.0
kitchen version: 1.14.2

(last edit, I will reply from now on)
This is just a private lab using Virtualbox… even though this fails, the machine is already created and I can, from within the kitchified VM, run ‘chef-client -o two::something-other-than-default’ - runs as expected. Again, just to confirm that the recipe is in fact, in the Chef server.

Thanks for any help you guys can provide!!


#2

Hmm, hard to guess. What do you mean by “when starting the converge, I do see”? How do you start the converge?
Did you try deleting you local cookbook cache rm -rf ~/.berkshelf/cookbooks? Maybe the same cookbook and version is cached there without the recipe and that causes the error. I would also try to do a complete kitchen destroy && rm -rf .kitchen && kitchen converge after deleting the cache, just to be sure to really start from scratch.


#3

Hey Joerg…
What I mean is, ‘kitchen converge’ gave me the output that followed. It looks as though the cookbook is able to reconcile all necessary cookbooks, yet still returns ‘cookbook not found’ errors.

I took your advice and deleted ~/.berkshelf/cookbooks/ , ran kitchen destroy and removed .kitchen/. Then I ran kitchen converge.

I’m getting errors but they are SSL_connect errors and I think I can fix that, but I will definitely get back to you to let you know if your suggestion worked for me. Thanks for your help!!


#4

Thanks Joerg,

I had a few other issues - the SSL problem with Berks, that I fixed with
"echo ‘{“ssl”:{“verify”: false }}’ > ~/.berkshelf/config.json", a couple of cookbooks had been renamed… so once I recognized those things, everything is working.

I’d call this ‘resolved’.