[lxc-devel] [PATCH] Documentation for Autoboot behaviour.

Serge Hallyn serge.hallyn at ubuntu.com
Fri May 9 03:22:57 UTC 2014


Quoting Michael H. Warfield (mhw at WittsEnd.com):
> This is a part of (now) 4 patches controlling the autoboot process.
> Dwight submitted the first patch to change the sysvinit script and the
> systemd service to use the sysvinit script during the autoboot process.
> 
> Subject: [PATCH v2] have systemd service call lxc-autostart via script
> 
> I then submitted 2 patches under:
> 
> Subject: [PATCH] Add a non-null group for autobooting
> 
> The first patch added the "onboot" group to the sysvinit script and the
> second added the same functionality to the Upstart lxc.conf file so our
> three major init systems behave coherently.
> 
> This now completes the set by adding documentation to the lxc-autostart
> and lxc.container.conf man pages documented the boot up behavior and and
> the various start options.
> 
> All four patches need to be applied in concert.
> 
> Regards,
> Mike
> 
> --  
> Documentation for Autoboot behaviour.
> 
> Added sections to lxc-autostart and lxc.container.config to document
> the behavior of the LXC service at host system boot time with regards
> to the lxc.group and lxc.start.auto parameters.
> 
> Signed-off-by: Michael H. Warfield <mhw at WittsEnd.com>

Thanks Michael, sorry about the delay.

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  doc/lxc-autostart.sgml.in      | 30 ++++++++++++++++++++++++++++++
>  doc/lxc.container.conf.sgml.in | 23 +++++++++++++++++++++++
>  2 files changed, 53 insertions(+)
> 
> diff --git a/doc/lxc-autostart.sgml.in b/doc/lxc-autostart.sgml.in
> index 3d423dd..116d7bc 100644
> --- a/doc/lxc-autostart.sgml.in
> +++ b/doc/lxc-autostart.sgml.in
> @@ -185,6 +185,36 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>          </variablelist>
>      </refsect1>
>  
> +    <refsect1>
> +        <title>Autostart and System Boot</title>
> +
> +        <para>
> +            The <command>lxc-autostart</command> command is used as part of the
> +            LXC system service, when enabled to run on host system at bootup and at
> +            shutdown.  It's used to select which containers to start in what order
> +            and how much to delay between each startup when the host system boots.
> +        </para>
> +
> +        <para>
> +            Each container can be part of any number of groups or no group at all.
> +            Two groups are special. One is the NULL group, i.e. the container does
> +            not belong to any group. The other group is the "onboot" group.
> +        </para>
> +
> +        <para>
> +            When the system boots with the LXC service enabled, it will first
> +            attempt to boot any containers with lxc.start.auto == 1 that is a member
> +            of the "onboot" group. The startup will be in order of lxc.start.order.
> +            If an lxc.start.delay has been specified, that delay will be honored
> +            before attempting to start the next container to give the current
> +            container time to begin initialization and reduce overloading the host
> +            system. After starting the members of the "onboot" group, the LXC system
> +            will proceed to boot containers with lxc.start.auto == 1 which are not
> +            members of any group (the NULL group) and proceed as with the onboot
> +            group.
> +        </para>
> +    </refsect1>
> +
>      &seealso;
>  
>      <refsect1>
> diff --git a/doc/lxc.container.conf.sgml.in b/doc/lxc.container.conf.sgml.in
> index 6e96889..bbae448 100644
> --- a/doc/lxc.container.conf.sgml.in
> +++ b/doc/lxc.container.conf.sgml.in
> @@ -1464,6 +1464,29 @@ mknod errno 0
>          </varlistentry>
>        </variablelist>
>      </refsect2>
> +
> +    <refsect2>
> +    <title>Autostart and System Boot</title>
> +    <para>
> +          Each container can be part of any number of groups or no group at all.
> +          Two groups are special. One is the NULL group, i.e. the container does
> +          not belong to any group. The other group is the "onboot" group.
> +    </para>
> +
> +    <para>
> +          When the system boots with the LXC service enabled, it will first
> +          attempt to boot any containers with lxc.start.auto == 1 that is a member
> +          of the "onboot" group. The startup will be in order of lxc.start.order.
> +          If an lxc.start.delay has been specified, that delay will be honored
> +          before attempting to start the next container to give the current
> +          container time to begin initialization and reduce overloading the host
> +          system. After starting the members of the "onboot" group, the LXC system
> +          will proceed to boot containers with lxc.start.auto == 1 which are not
> +          members of any group (the NULL group) and proceed as with the onboot
> +          group.
> +    </para>
> +
> +    </refsect2>
>    </refsect1>
>  
>    <refsect1>
> -- 
> 1.9.0
> 
> 
> -- 
> Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
>    /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
>    NIC whois: MHW9          | An optimist believes we live in the best of all
>  PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
> 



> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel



More information about the lxc-devel mailing list