Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Add fallback mechanism for platforms without attach support #294

Merged
merged 1 commit into from Jun 9, 2014
Merged

Add fallback mechanism for platforms without attach support #294

merged 1 commit into from Jun 9, 2014

Conversation

ghost
Copy link

@ghost ghost commented Jun 3, 2014

Some platforms (most notably CentOS and RHEL) use a kernel without
'attach' support. This patch detects this absence and falls back
to the alternative ways of doing things like detection of IP address
and halting the container.
It does so by running the command true through lxc-attach and testing
if that works. The true command can probably be safely assumed to
be available on all GNU/Linux installations.

This patch essentially enables support for the CentOS 6 and RHEL 6
platform, at least for the basic vagrant commands up, halt and destroy.

Some platforms (most notably CentOS and RHEL) use a kernel without
'attach' support. This patch detects this absence and falls back
to the alternative ways of doing things like detection of IP address
and halting the container.
It does so by running the command "true" through lxc-attach.
@fgrehm
Copy link
Owner

fgrehm commented Jun 4, 2014

@bkkrw Awesome! This looks good to me but would you be able to provide instructions on setting up a CentOS host so that I can try this out? Thanks in advance!

fgrehm added a commit that referenced this pull request Jun 9, 2014
Add fallback mechanism for platforms without attach support
@fgrehm fgrehm merged commit 3fe6cc0 into fgrehm:master Jun 9, 2014
@fgrehm
Copy link
Owner

fgrehm commented Jun 9, 2014

@bkkrw Thanks, I've merged but it would be great if you could point out how I can set up a CentOS host so that I'm able to properly test the plugin over there :-)

fgrehm added a commit that referenced this pull request Jun 9, 2014
@ghost
Copy link
Author

ghost commented Jun 10, 2014

@fgrehm Sorry for the late reply, I was out for a few days. I will create a script to be used with the vagrant shell provisioner, similar to your scripts from the vagrant-lxc-vbox-hosts repo.
Thanks for the merge!

PS. We use Puppet to provision machines, I cobbled up a simple manifest here: https://gist.github.com/bkkrw/667fec7acbfcb3386449. It should be readable, even without any Puppet knowledge.
I'll convert this to a shell script.

@fgrehm
Copy link
Owner

fgrehm commented Jun 10, 2014

Thats great! I've done a bit of puppet on the past so it's pretty straightforward for me to understand. I'll open up an issue on the vbox-hosts repo with a link to that gist so that I don't loose track if it ;-)

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

Successfully merging this pull request may close these issues.

1 participant