Hey everyone, Thanks for the feedback on my previous autostart proposal.
Here's a detailed bullet-point list of what should be done to implement autostarting containers in upstream LXC. Changes to the container config: - ADD: lxc.start.auto (integer, 0 = disabled, 1 = enabled, default: 0) - ADD: lxc.start.delay (integer, time in second, default: 0) - ADD: lxc.start.order (integer, boot order, default: 0) - ADD: lxc.group (string, multi-value, default: empty) - NOTE: lxc.start.auto is an integer as there are plans to implement a third value 2 = last-state. Changes to the system config: - ADD: lxc.autostart.enabled (boolean, default: false) - ADD: lxc.autostart.group (string, multi-value, default: empty) Changes to the commands: - lxc-config * Add a "-n <container>" option to query the container config instead of the system config - lxc-list * Allow filtering by group * Allow showing the groups in the fancy view - lxc-start * Add a "-a" option which will match any container that has lxc.start.auto set to 1 * Add a "-g <groups>" option which will match any container that has one of the groups in lxc.group matching one of the groups in <groups> (comma separated). * Both options imply -n. * NOTE: When starting containers, sort them by start order (lxc.start.order) and wait until the delay is passed before starting the next one (lxc.start.delay). - lxc-stop * Add a "-a" option which will match any container that has lxc.start.auto set to 1 * Add a "-g <groups>" option which will match any container that has one of the groups in lxc.group matching one of the groups in <groups> (comma separated). * Both options imply -n. Examples: - lxc-start -a => Starts all auto-started containers that are in one of the groups listed in lxc.autostart.group (system config). If the system config entry isn't set, start all containers that DO NOT have lxc.start.group set (container config). - lxc-start -g django => Starts all the containers that have django in their lxc.start.group regardless of the autostart flag. - lxc-start -g django -a => Starts all autostarted containers that have django in their lxc.start.group. - lxc-start -g django,graphite -a => Starts all autostarted containers that have either django or graphite in their lxc.start.group - lxc-start -g any => Starts all defined containers regardless of autostart flag or group. - lxc-stop behaves in the exact same way as lxc-start but stopping/shutting down/rebooting the container instead. - lxc-config -n p1 lxc.utsname => returns p1 - lxc.config lxc.autostart.enabled => returns true -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel