[lxc-devel] [PATCH] ensure all config items are duplicated on clone/write_config
Dwight Engen
dwight.engen at oracle.com
Thu Jan 9 20:36:13 UTC 2014
Since previously I had found a config item that wasn't being propagated
by lxc-clone, I went through all the config items and made sure that:
a) Each item is documented in lxc.conf
b) Each item is written out by write_config
The only one that isn't is lxc.include, which by its nature only pulls
in other config item types.
Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
---
doc/lxc.conf.sgml.in | 11 +++++++++++
src/lxc/confile.c | 14 ++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/doc/lxc.conf.sgml.in b/doc/lxc.conf.sgml.in
index 1350c63..1aa7817 100644
--- a/doc/lxc.conf.sgml.in
+++ b/doc/lxc.conf.sgml.in
@@ -327,6 +327,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<varlistentry>
<term>
+ <option>lxc.network.mtu</option>
+ </term>
+ <listitem>
+ <para>
+ specify the maximum transfer unit for this interface.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
<option>lxc.network.name</option>
</term>
<listitem>
diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index d21fbec..3c56876 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
@@ -2158,6 +2158,12 @@ void write_config(FILE *fout, struct lxc_conf *c)
fprintf(fout, "lxc.aa_profile = %s\n", c->lsm_aa_profile);
if (c->lsm_se_context)
fprintf(fout, "lxc.se_context = %s\n", c->lsm_se_context);
+ if (c->seccomp)
+ fprintf(fout, "lxc.seccomp = %s\n", c->seccomp);
+ if (c->kmsg == 0)
+ fprintf(fout, "lxc.kmsg = 0\n");
+ if (c->autodev)
+ fprintf(fout, "lxc.autodev = 1\n");
if (c->loglevel != LXC_LOG_PRIORITY_NOTSET)
fprintf(fout, "lxc.loglevel = %s\n", lxc_log_priority_to_string(c->loglevel));
if (c->logfile)
@@ -2253,4 +2259,12 @@ void write_config(FILE *fout, struct lxc_conf *c)
fprintf(fout, "lxc.rootfs.mount = %s\n", c->rootfs.mount);
if (c->rootfs.pivot)
fprintf(fout, "lxc.pivotdir = %s\n", c->rootfs.pivot);
+ if (c->start_auto)
+ fprintf(fout, "lxc.start.auto = %d\n", c->start_auto);
+ if (c->start_delay)
+ fprintf(fout, "lxc.start.delay = %d\n", c->start_delay);
+ if (c->start_order)
+ fprintf(fout, "lxc.start.order = %d\n", c->start_order);
+ lxc_list_for_each(it, &c->groups)
+ fprintf(fout, "lxc.group = %s\n", (char *)it->elem);
}
--
1.8.3.1
More information about the lxc-devel
mailing list