Atalanta / cucumber-chef

Framework for test-driven infrastructure development
http://cucumber-chef.org
Apache License 2.0
265 stars 55 forks source link

Doesn't seem to actually run chef-client #124

Closed pikesley closed 11 years ago

pikesley commented 11 years ago

Hi Zach

I've got a little time this week to properly dive into cuke-chef-3 :) After a little hacking around and a lot of swearing, I've got a test lab running, and I'm able to run some tests. My sample feature is here, and the first few tests pass with flying colours. However when we get to * package "postfix" should be installed it fails because it is indeed not installed (I checked by jumping on the container). But my Labfile specifies the base role, and that includes Postfix, amongst other things. I tried explicitly adding "recipe[postfix]" to the Labfile too, with the same result.

In cuke-chef-2, we had * the chef-client has been run on "superawesomeserver". Is that supposed to be implicit in 3? Have I misunderstood something here?

Thanks

Sam

zpatten commented 11 years ago

Sorry for the late response. I've been cranking on the testlab gem (which is going into cucumber-chef v4.0).

Ya so the chef-client runs should all happen when cucumber runs. Cucumber triggers the client up call; which then calls provision on the containers: https://github.com/Atalanta/cucumber-chef/blob/master/lib/cucumber/chef/client.rb#L100-L108 https://github.com/Atalanta/cucumber-chef/blob/master/lib/cucumber/chef/containers.rb#L94-L96

The cucumber-chef.log should have the output in there somewhere from the chef-client run. That should give us a clue as to what went wrong.

zpatten commented 11 years ago

I had recently re-introduced an issue with ZTK::SSH; which is now fixed in the latest patch release. It is possible that there was an issue with the SSH connection caused by that.

zpatten commented 11 years ago

@pikesley I see a possible issue where the chef-client looks like it's trying to hit port 4000 instead of SSL at some point in the run (using chef-client 10.24.0).

zpatten commented 11 years ago

Haven't forgotten about this; did some quick fiddling yesterday and everything is running according to the cc-chef-repo. Manually inspection of the containers shows chef-client is running.

pikesley commented 11 years ago

My cuke-chef repo is now based off your setup and it's working fine. I have no idea what I was doing wrong before, but I'm closing this one now.