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

Run apt recipe before LXC to make sure APT repos are up-to-date #155

Closed
wants to merge 1 commit into from

Conversation

fancyremarker
Copy link
Contributor

I added the apt cookbook to the Kitchen suite in order to avoid the following exception on kitchen test; is there a better way to do this?

 STDERR: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/n/nspr/libnspr4_4.9.5-0ubuntu0.12.04.1_amd64.deb  404  Not Found [IP: 91.189.91.14 80]
 Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3_3.15.3-0ubuntu0.12.04.1_amd64.deb  404  Not Found [IP: 91.189.91.14 80]
 Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libx/libxml2/python-libxml2_2.7.8.dfsg-5.1ubuntu4.6_amd64.deb  404  Not Found [IP: 91.189.91.14 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 yum=3.2.25-1ubuntu2 ----
 Ran apt-get -q -y install yum=3.2.25-1ubuntu2 returned 100

@bflad
Copy link
Contributor

bflad commented Jun 24, 2014

The default recipe should already call the apt recipe for debian boxes, so not sure what you're seeing. Just merged #147, so I'll refactor and fix this if it makes sense.

@bflad bflad closed this Jun 24, 2014
@fancyremarker
Copy link
Contributor Author

The issue is that lxc::default recipe is invoked in the Test Kitchen run list before any recipes from this cookbook. The lxc::default recipe can fail in certain cases when the APT cache is not up to date. Including the apt recipe is one way to fix this, but without a change like this one, the error I cited above can occur on any kitchen test run.

@bflad
Copy link
Contributor

bflad commented Jun 24, 2014

Ah very true. Sorry I was looking at the merged #147 codebase, which doesn't call lxc in test kitchen beforehand now.

@fancyremarker
Copy link
Contributor Author

Oh, duh. I was not looking at that codebase. Yeah, this fix should be moot with that merge. Sorry for the noise.

@bflad
Copy link
Contributor

bflad commented Jun 24, 2014

Definitely not your fault. I said I was going to merge it like a month ago and never did. Now that its merged we can all benefit. So sorry it took me so long! 😄

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

Successfully merging this pull request may close these issues.

None yet

2 participants