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

Open to removing dependency on LXC cookbook? #32

Closed
jayofdoom opened this issue Dec 19, 2013 · 8 comments
Closed

Open to removing dependency on LXC cookbook? #32

jayofdoom opened this issue Dec 19, 2013 · 8 comments

Comments

@jayofdoom
Copy link
Contributor

Hey Brian,

I've been testing out this cookbook on 13.10 (in anticipation of 14.04 release), and I'm finding the LXC cookbook, as well as the dpkg-autostart cookbook it depends on, it causing lots of headaches on newer ubuntu releases.

In addition, the cookbook does a lot of additional stuff that's simply not needed for docker (such as creating network interfaces and installing rubygems).

Would you be amenable to removing the dependency from the cookbook and installing the required LXC packages directly? If so I'll get a PR in tomorrow.

Thanks,
Jay

@bflad
Copy link
Contributor

bflad commented Dec 19, 2013

Jay, first of all, awesome! Let's try to obviate the need for LXC cookbook dependency unless someone wants it. Docker I believe is moving towards considering pluggable virtualization back ends at some point anyways.

I'd be curious to know if anyone is using the LXC customizations provided by that cookbook. I don't personally have this deployed at large scale, so I'm not sure the usefulness of that cookbook.

In the meantime since I've abstracted out the lxc recipe in this cookbook so we can customize the behavior, maybe we should limit lxc cookbook usage to just <13.10? Could we help fix their cookbook more?

I'd love to start introducing attributes for choosing your virtualization/filesystem/networking backends even if Docker isn't ready for that yet.

@bkw
Copy link
Contributor

bkw commented Dec 19, 2013

+1 for getting rid of all the extras that the lxc cookbook brings. That being said, I just submitted hw-cookbooks/lxc#47 and sous-chefs/dpkg_autostart#6 that might make your life a bit easier on Saucy in the meantime. Now we only have to make aufs optional and I think we're ready for 13.10 support.

@bflad
Copy link
Contributor

bflad commented Dec 30, 2013

As noted in #34, please note LXC installation/dependency is currently required for binary installs, although we might be able to get away with just installing LXC packages. Did see the lxc/dpkg_autostart changes were merged, did they help? How would you like to proceed here?

@jayofdoom
Copy link
Contributor Author

I'd still rather not do all the stuff the LXC cookbook does if not necessary. I've updated the other guy's PR to reflect your suggested changes.

Thanks!

@bflad
Copy link
Contributor

bflad commented Jan 2, 2014

I'd love to fix their cookbook to separate recipes (such as package, service, etc.) so we can call on them as necessary and not get all the aforementioned cruft. We also need to submit back package support for non-Ubuntu OSes back to them. Maybe I'll submit a PR or two and see how that goes.

I'm also getting an annoying error on lxc package installation from their cookbook:

root@docker-ubuntu-1310:~# apt-get install -y lxc
Reading package lists... Done
Building dependency tree
Reading state information... Done
lxc is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up lxc (1.0.0~alpha1-0ubuntu14) ...
invoke-rc.d: policy-rc.d returned error status 100
dpkg: error processing lxc (--configure):
 subprocess installed post-installation script returned error exit status 100
dpkg: dependency problems prevent configuration of lxc-templates:
 lxc-templates depends on lxc (>= 0.8.0~rc1-4ubuntu43); however:
  Package lxc is not configured yet.

dpkg: error processing lxc-templates (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 lxc
 lxc-templates
E: Sub-process /usr/bin/dpkg returned an error code (1)

I think once they separate out their recipes, it'll make life better for the above error and everyone.

@bkw
Copy link
Contributor

bkw commented Jan 2, 2014

@bflad this looks suspiciously like the problem I fixed in sous-chefs/dpkg_autostart#6 . Are your dependencies up to date? lxc 1.1.6 requires dpkg_autostart ~> 0.1.10 which has the fix.

Background: lxc uses dpkg_autostart to disable startup on boot for services lxc and lxc-net. This is done by creating a /usr/sbin/policy-rc.d file, which is then consulted by the system for every upstart service call. Unfortunately this file did not cater well enough for service with no /etc/init.d file.

@bflad
Copy link
Contributor

bflad commented Jan 2, 2014

@bkw nice! You were exactly right. Cleared out my Berkshelf cache and it worked like a charm. I've just added an explicit depends for lxc in the metadata in master: dbc922c

@jayofdoom
Copy link
Contributor Author

This is resolved for me; we only pull in the LXC cookbook when absolutely needed.

Thanks!

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

3 participants