-
Notifications
You must be signed in to change notification settings - Fork 29
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
base: main
Are you sure you want to change the base?
Conversation
TODO: * support aufs * support tmpfs * documentation * tests
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? |
There was a problem hiding this comment.
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.
@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 👍 |
@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 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? |
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 |
TODO: