Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test kitchen fails with apt-get as package list hasn't been updated #7

Closed
flaccid opened this issue Mar 13, 2014 · 2 comments
Closed

Comments

@flaccid
Copy link

flaccid commented Mar 13, 2014

The cookbook should depend on the apt cookbook or somehow test kitchen should run apt-get update so package installs don't fail in this manner.

Tail from kitchen test:

...
Not Found [IP: 91.189.91.15 80]
       Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openjdk-6/openjdk-6-jdk_6b27-1.12.6-1ubuntu0.12.04.4_amd64.deb  404  Not Found [IP: 91.189.91.15 80]
       E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
       ---- End output of apt-get -q -y install openjdk-6-jdk=6b27-1.12.6-1ubuntu0.12.04.4 ----
       Ran apt-get -q -y install openjdk-6-jdk=6b27-1.12.6-1ubuntu0.12.04.4 returned 100
[2014-03-13T05:07:09+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)       
>>>>>> Converge failed on instance <default-ubuntu-1204>.
>>>>>> Please see .kitchen/logs/default-ubuntu-1204.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sudo -E chef-solo --config /tmp/kitchen/solo.rb --json-attributes /tmp/kitchen/dna.json  --log_level info]
>>>>>> ----------------------
@priestjim
Copy link
Owner

If you include a recent enough apt cookbook version, it will automatically update the local cache once every 24h (using the /var/lib/apt/periodic/update-success-stamp file) so just by including the 'apt' recipe, this is fixed.

@flaccid
Copy link
Author

flaccid commented Mar 20, 2014

Thats right, depending on the cookbook isn't enough. Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants