[lxc-devel] [lxc/master] Add lxc.console.buffer.* and lxc.namespace.* to Japanese lxc.container.conf(5)

tenforward on Github lxc-bot at linuxcontainers.org
Tue Dec 5 08:17:48 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 507 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20171205/938191cc/attachment.bin>
-------------- next part --------------
From 4d94eb7d6b944975ce7bfa2651303b9959bebea8 Mon Sep 17 00:00:00 2001
From: KATOH Yasufumi <karma at jazz.email.ne.jp>
Date: Tue, 5 Dec 2017 16:22:37 +0900
Subject: [PATCH 1/2] doc: Add lxc.console.buffer.* and lxc.console.rotate to
 Japanese lxc.container.conf(5)

and update the description of lxc.console.logfile

Signed-off-by: KATOH Yasufumi <karma at jazz.email.ne.jp>
---
 doc/ja/lxc.container.conf.sgml.in | 98 +++++++++++++++++++++++++++++++++++++--
 1 file changed, 95 insertions(+), 3 deletions(-)

diff --git a/doc/ja/lxc.container.conf.sgml.in b/doc/ja/lxc.container.conf.sgml.in
index 525e2d551..84faf65ee 100644
--- a/doc/ja/lxc.container.conf.sgml.in
+++ b/doc/ja/lxc.container.conf.sgml.in
@@ -903,6 +903,66 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
         コンテナでルートファイルシステムを持つように設定されており、inittab ファイルでコンソールの使用が設定されている場合、このコンソールの出力がどこになされるのかを指定したいと思うでしょう。
       </para>
       <variablelist>
+
+        <varlistentry>
+          <term>
+            <option>lxc.console.buffer.size</option>
+          </term>
+          <listitem>
+            <para>
+              <!--
+            Setting this option instructs liblxc to allocate an in-memory
+            ringbuffer. The container's console output will be written to the
+            ringbuffer. Note that ringbuffer must be at least as big as a
+            standard page size. When passed a value smaller than a single page
+            size liblxc will allocate a ringbuffer of a single page size. A page
+            size is usually 4kB.
+                -->
+              このオプションを設定すると、liblxc はインメモリのリングバッファを割り当てます。コンテナのコンソールはリングバッファに出力されます。リングバッファは少なくとも標準ページサイズの大きさでなければなりません。ページサイズより小さい値を与えた場合は、liblxc  はページサイズのリングバッファを割り当てます。ページサイズは通常は 4kB です。
+
+              <!--
+            The keyword 'auto' will cause liblxc to allocate a ringbuffer of
+            128kB.
+                -->
+              'auto' を指定すると、liblxc は 128kB のリングバッファを割り当てます。
+
+              <!--
+            When manually specifying a size for the ringbuffer the value should
+            be a power of 2 when converted to bytes. Valid size prefixes are
+            'kB', 'MB', 'GB'. (Note that all conversions are based on multiples
+            of 1024. That means 'kb' == 'KiB', 'MB' == 'MiB', 'GB' == 'GiB'.)
+                -->
+              リングバッファサイズを数値指定する場合、値がバイトに変換されるときに 2 の累乗になります。サイズ接頭辞付きの単位として 'kB'、'MB'、'GB' が使えます。(この場合の変換は 1024 の倍数に基づいています。つまり 'kB' == 'KiB'、'MB' == 'MiB'、'GB' == 'GiB' という意味です。)
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term>
+            <option>lxc.console.buffer.logfile</option>
+          </term>
+          <listitem>
+            <para>
+              <!--
+            Setting this option instructs liblxc to write the in-memory
+            ringbuffer to disk. For performance reasons liblxc will only write
+            the in-memory ringbuffer to disk when requested. Note that the this
+            option is only used by liblxc when
+            <option>lxc.console.buffer.size</option> is set.
+            -->
+              このオプションを設定すると、liblxc はインメモリのリングバッファをディスクに書き込みます。パフォーマンスを考慮して、liblxc は指定をした場合に限り、インメモリのリングバッファをディスクに書き込みます。liblxc はこのオプションを、<option>lxc.console.buffer.size</option> が指定された場合のみ使います。
+
+              <!--
+            By default liblxc will dump the contents of the in-memory ringbuffer
+            to disk when the container terminates. This allows users to diagnose
+            boot failures when the container crashed before an API request to
+            retrieve the in-memory ringbuffer could be sent or handled.
+                -->
+              デフォルトでは liblxc は、コンテナが終了した際にインメモリのリングバッファの内容をディスクに書き出します。これによりユーザは、インメモリのリングバッファを取得する API リクエストが送られたり処理される前に、コンテナがクラッシュした場合、ブートの失敗を調査できます。
+            </para>
+          </listitem>
+        </varlistentry>
+
         <varlistentry>
           <term>
             <option>lxc.console.logfile</option>
@@ -910,13 +970,45 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
           <listitem>
             <para>
               <!--
-              Specify a path to a file where the console output will
-              be written.
+              Specify a path to a file where the console output will be written.
+              Note that in contrast to the on-disk ringbuffer logfile this file
+              will keep growing potentially filling up the users disks if not
+              rotated and deleted. This problem can also be avoided by using the
+              in-memory ringbuffer options
+              <option>lxc.console.buffer.size</option> and
+              <option>lxc.console.buffer.logfile</option>.
               -->
-              コンソール出力を書き込むファイルのパスを指定します。
+              コンソール出力を書き込むファイルのパスを指定します。ディスクに保存されるリングバッファログと異なり、このファイルはサイズが大きくなり続けるので、ファイルがローテートや削除されない限りは、ユーザのディスクをいっぱいにしてしまう可能性があります。この問題は、インメモリのリングバッファオプションである、<option>lxc.console.buffer.size</option> と <option>lxc.console.buffer.logfile</option> を使うことでも回避できます。
             </para>
           </listitem>
         </varlistentry>
+
+        <varlistentry>
+          <term>
+            <option>lxc.console.rotate</option>
+          </term>
+          <listitem>
+            <para>
+              <!--
+              Whether to rotate the console logfile specified in
+              <option>lxc.console.logfile</option>. Users can send an API
+              request to rotate the logfile. Note that the old logfile will have
+              the same name as the original with the suffix ".1" appended.
+              -->
+              <option>lxc.console.logfile</option> で指定したコンソールログファイルをローテートするかどうかを指定します。ユーザはログファイルをローテートするように API リクエストを送ることができます。古いログファイルは、元のファイル名と同じ名前のファイルに ".1" というサフィックスが付け加わります。
+
+              <!--
+              Users wishing to prevent the console log file from filling the
+              disk should rotate the logfile and delete it if unneeded. This
+              problem can also be avoided by using the in-memory ringbuffer
+              options <option>lxc.console.buffer.size</option> and
+              <option>lxc.console.buffer.logfile</option>.
+              -->
+              ユーザがコンソールログでディスクがいっぱいになるのを防ぐには、ログファイルをローテートし、不要なログファイルを削除してください。この問題はインメモリのリングバッファオプションである <option>lxc.console.buffer.size</option> と <option>lxc.console.buffer.logfile</option> を使うことでも防げます。
+            </para>
+          </listitem>
+        </varlistentry>
+
         <varlistentry>
           <term>
             <option>lxc.console.path</option>

From 615e68b2e52137b46a7d336c3e285d226bf61769 Mon Sep 17 00:00:00 2001
From: KATOH Yasufumi <karma at jazz.email.ne.jp>
Date: Tue, 5 Dec 2017 17:08:52 +0900
Subject: [PATCH 2/2] doc: Add lxc.namespace.[namespace identifier] to Japanese
 lxc.container.conf(5)

and fix the description of namespace inheritance

Signed-off-by: KATOH Yasufumi <karma at jazz.email.ne.jp>
---
 doc/ja/lxc.container.conf.sgml.in | 82 +++++++++++++++++++++++++++++++++++++++
 doc/lxc.container.conf.sgml.in    |  3 +-
 2 files changed, 83 insertions(+), 2 deletions(-)

diff --git a/doc/ja/lxc.container.conf.sgml.in b/doc/ja/lxc.container.conf.sgml.in
index 84faf65ee..52bf10b28 100644
--- a/doc/ja/lxc.container.conf.sgml.in
+++ b/doc/ja/lxc.container.conf.sgml.in
@@ -1756,6 +1756,88 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
       </variablelist>
     </refsect2>
 
+    <refsect2>
+      <title>名前空間の継承 <!-- Namespace Inheritance --></title>
+      <para>
+        <!--
+        A namespace can be inherited from another container or process.
+          -->
+        他のコンテナやプロセスから名前空間を継承できます。
+      </para>
+      <variablelist>
+        <varlistentry>
+          <term>
+            <option>lxc.namespace.[namespace identifier]</option>
+          </term>
+          <listitem>
+            <para>
+              <!--
+            Specify a namespace to inherit from another container or process.
+            The <option>[namespace identifier]</option> suffix needs to be
+            replaced with one of the namespaces that appear in the
+            <filename>/proc/PID/ns</filename> directory.
+            -->
+              他のコンテナやプロセスから継承する名前空間を指定します。<option>[namespace identifier]</option> には、<filename>/proc/PID/ns</filename> ディレクトリ内に現れる名前空間のひとつが入ります。
+            </para>
+
+            <para>
+              <!--
+            To inherit the namespace from another process set the
+            <option>lxc.namespace.[namespace identifier]</option> to the PID of
+            the process, e.g. <option>lxc.namespace.net=42</option>.
+            -->
+              他のプロセスから名前空間を継承するには、<option>lxc.namespace.[namespace identifier]</option> の値をプロセスの PID に設定します。例えば <option>lxc.namespace.net=42</option> のようになります。
+            </para>
+
+            <para>
+              <!--
+            To inherit the namespace from another container set the 
+            <option>lxc.namespace.[namespace identifier]</option> to the name of
+            the container, e.g. <option>lxc.namespace.pid=c3</option>.
+            -->
+              他のコンテナから名前空間を継承するには、<option>lxc.namespace.[namespace identifier]</option> の値をコンテナ名に設定します。例えば <option>lxc.namespace.pid=c3</option> のようになります。
+            </para>
+
+            <para>
+              <!--
+            To inherit the namespace from another container located in a
+            different path than the standard liblxc path set the
+            <option>lxc.namespace.[namespace identifier]</option> to the full
+            path to the container, e.g.
+            <option>lxc.namespace.user=/opt/c3</option>.
+            -->
+              標準の liblxc のパスとは異なるコンテナパスに存在する他のコンテナから名前空間を継承するには、<option>lxc.namespace.[namespace identifier]</option> をそのコンテナのフルパスで指定します。例えば <option>lxc.namespace.user=/opt/c3</option> のようになります。
+            </para>
+
+            <para>
+              <!--
+            In order to inherit namespaces the caller needs to have sufficient
+            privilege over the process or container.
+                -->
+              名前空間を継承するためには、呼び出し元が継承元のプロセスまたはコンテナに対して十分な権限を持っている必要があります。
+            </para>
+
+            <para>
+              <!--
+            Note that sharing pid namespaces between system containers will
+            likely not work with most init systems.
+                -->
+              システムコンテナ間での PID 名前空間の共有は、ほとんどの init システムではうまく動作しない可能性があることに注意が必要です。
+            </para>
+
+            <para>
+              <!--
+            Note that if two processes are in different user namespaces and one
+            process wants to inherit the other's network namespace it usually
+            needs to inherit the user namespace as well.
+                -->
+              ふたつのプロセスが異なるユーザ名前空間に存在し、そのうちのひとつが他のネットワーク名前空間を継承したい場合、通常はユーザ名前空間も同様に継承する必要があることに注意が必要です。
+            </para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+    </refsect2>
+
     <refsect2>
       <title>リソース制限 <!-- Resource limits --></title>
       <para>
diff --git a/doc/lxc.container.conf.sgml.in b/doc/lxc.container.conf.sgml.in
index 7df6c0eb9..21d9cfcc1 100644
--- a/doc/lxc.container.conf.sgml.in
+++ b/doc/lxc.container.conf.sgml.in
@@ -1300,8 +1300,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
     <refsect2>
       <title>Namespace Inheritance</title>
       <para>
-        The capabilities can be dropped in the container if this one
-        is run as root.
+        A namespace can be inherited from another container or process.
       </para>
       <variablelist>
         <varlistentry>


More information about the lxc-devel mailing list