Merge lp:~kampka/ubuntu/quantal/lxc/upstart-instance into lp:ubuntu/quantal/lxc
Status: | Work in progress |
---|---|
Proposed branch: | lp:~kampka/ubuntu/quantal/lxc/upstart-instance |
Merge into: | lp:ubuntu/quantal/lxc |
Diff against target: |
98 lines (+32/-17) (has conflicts) 4 files modified
debian/changelog (+6/-0) debian/lxc.lxc-instance.upstart (+23/-0) debian/lxc.upstart (+2/-17) debian/rules (+1/-0) Text conflict in debian/changelog |
To merge this branch: | bzr merge lp:~kampka/ubuntu/quantal/lxc/upstart-instance |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Serge Hallyn | Approve | ||
Ubuntu branches | Pending | ||
Review via email: mp+123995@code.launchpad.net |
Description of the change
This change proposes that upstart takes care of running and managing lxc container instances instead of having them run as daemons.
This has some advantages:
- lxc containers can benefit from upstart supervision, eg. respawn can be easily enabled, and parallel job execution
At the moment with serial execution, stopping the lxc service can (worst case)
take up to n times $LXC_SHUTDOWN_
Having upstart manage instance shutdown avoids this problem.
- Administrators can write upstart jobs that run on lxc container startup/shutdown of a specific container.
Consider for example a job that enables transparent port 80 routing once a container names "squid" comes up.
I have not found any possibility to assign the instance kill timeout dynamically so for now it's fixed at two minutes.
Unmerged revisions
- 144. By Christian Kampka
-
* [Upstart]
- add usage stanza to lxc-instance job
- stop lxc-instance on 'stopping lxc' - 143. By Christian Kampka
-
Have upstart run lxc instances
Just a couple of points:
- It would be extremely useful if you added a 'usage' stanza to allow admins to see how to run the lxc-instance job as currently, if you forget to specify it, the job does nothing, silently.
For example, add something like:
usage "NAME=name of LXC instance, CONFIG=full path to configuration file"
See http:// upstart. ubuntu. com/cookbook/ #usage
- Shouldn't that 'stop on' condition be 'stop on stopping lxc' ('stopping' rather than 'stopped')?