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

basic lxc-start-ephemeral support on overlayfs #35

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

akshaykarle
Copy link

TODO:

  • support aufs
  • support tmpfs
  • documentation
  • tests

TODO:
* support aufs
* support tmpfs
* documentation
* tests
@akshaykarle
Copy link
Author

This in response to #33

def start_ephemeral(original_container_name, target_container_name, opts={})
orig = LXC::Container.new(original_container_name)
dest = LXC::Container.new(target_container_name)
raise "#{original_container_name} is not present. Exiting.." unless orig.defined?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will be nice to have custom exception and raise that.

@ranjib
Copy link
Contributor

ranjib commented Nov 9, 2015

@akshaykarle dude, if we can have a ruby-lxc API for this, it would be awesome :-) . can you provide an example in the readme. we should have specs, if we extract the methods, it will be easier to test it independently. let me know if you want help with writing the specs. i can help with that as well

👍
@andrenth i can use this too :-)

@akshaykarle
Copy link
Author

@ranjib I had planned the documentation/example and code cleanup once I had a decent coverage in the specs. Right now this is mostly a port of the lxc-start-ephemeral CLI from https://github.com/lxc/lxc.

I had some trouble getting them running. For now, I'm making the changes you suggested. Will push them out soon after testing them manually. I got around some problems running specs but noticed that you need to run the specs as root :(

Also, can you clarify by what you mean by a ruby-lxc API for start_ephemeral? Maybe an example? Is there an API for any other operations?

@andrenth
Copy link
Contributor

Sorry for taking so long to reply guys. Honestly I'm a bit torn on this one, because while I see the usefulness, it was never my goal to reimplement higher level LXC features/commands in ruby-lxc, but simply to provide bindings to the library.

As a compromise, what do you guys think of including this but not requiring it by default (i.e., the user would have to require 'lxc/start_ephemeral' by himself in order to use it)?

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

Successfully merging this pull request may close these issues.

3 participants