Re: [lxc-devel] RFC: cgroups aware proc

2014-01-07 Thread Marian Marinov

On 01/07/2014 01:17 PM, Li Zefan wrote:

On 2014/1/5 8:12, Marian Marinov wrote:

Happy new year guys.

I need to have /proc cgroups aware, as I want to have LXC containers that see 
only the resources that are given to them.

In order to do that I had to patch the kernel. I decided to start with cpuinfo, 
stat and interrupts and then continue
with meminfo and loadavg.

I managed to patch the Kernel (linux 3.12.0) and make /proc/cpuinfo, /proc/stat 
and /proc/interrupts be cgroups aware.

Attached are the patches that make the necessary changes.

The change for /proc/cpuinfo and /proc/interrupts is currently done only for 
x86 arch, but I will patch the rest of the
architectures if the style of the patches is acceptable.

Tomorrow I will check if the patches apply and build with the latest kernel.



People tried to do this before, but got rejected by upstream maintainers,
and then the opinion was to do this in userspace throught FUSE.

Seems libvirt-lxc already supports containerized /proc/meminfo in this way.
See:
http://libvirt.org/drvlxc.html


I'm well aware of the FUSE approach and the fact that the kernel maintainers do not accept the this kind of changing the 
kernel but the simple truth is that FUSE is too have for this thing.


I'm setting up a repo on GitHub which will hold all the patches for this and will keep updating it even if it is not 
accepted by the upstream maintainers. I'll give you the link within a few days.


I have already finished with CPU and Memory... the only thing that is left is the /proc/loadavg, which will take more 
time, but will be done.


I hope some of the scheduler maintainers at least to give me some comments on 
the patches that I have done.

Marian







___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [lxc/lxc] 2e3b01: travis: Use NOTICE instead of PRIVMSG on IRC

2014-01-07 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 2e3b013411fe5aedc88789d41b4388421a8be7fd
  https://github.com/lxc/lxc/commit/2e3b013411fe5aedc88789d41b4388421a8be7fd
  Author: Stéphane Graber 
  Date:   2014-01-07 (Tue, 07 Jan 2014)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  travis: Use NOTICE instead of PRIVMSG on IRC

Signed-off-by: Stéphane Graber 


___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [lxc/lxc] 12dcc8: configure: find seccomp using pkg-config

2014-01-07 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 12dcc8928f33fa0d45357d30bca532f9a35327a5
  https://github.com/lxc/lxc/commit/12dcc8928f33fa0d45357d30bca532f9a35327a5
  Author: Jiri Slaby 
  Date:   2014-01-07 (Tue, 07 Jan 2014)

  Changed paths:
M configure.ac
M src/lxc/Makefile.am

  Log Message:
  ---
  configure: find seccomp using pkg-config

On suse we have the header in a subdir inside /usr/include, so
pkgconfig has to be used to find out proper CFLAGS.

Signed-off-by: Jiri Slaby 
Acked-by: Stéphane Graber 


  Commit: cc33e055dd047af7b4cc8a226bb54b3b9c450152
  https://github.com/lxc/lxc/commit/cc33e055dd047af7b4cc8a226bb54b3b9c450152
  Author: Jiri Slaby 
  Date:   2014-01-07 (Tue, 07 Jan 2014)

  Changed paths:
M templates/lxc-opensuse.in

  Log Message:
  ---
  lxc-opensuse: add perl-base to prerequisities

It is needed by insserv-compat.

Signed-off-by: Jiri Slaby 
Acked-by: Stéphane Graber 


  Commit: ddb9359321675b5d22d1d3c6b9461fee575570f8
  https://github.com/lxc/lxc/commit/ddb9359321675b5d22d1d3c6b9461fee575570f8
  Author: Stéphane Graber 
  Date:   2014-01-07 (Tue, 07 Jan 2014)

  Changed paths:
M configure.ac

  Log Message:
  ---
  Move pkg-config init to way earlier

Signed-off-by: Stéphane Graber 


Compare: https://github.com/lxc/lxc/compare/baeebd0d7902...ddb935932167___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [Fixed] lxc/lxc#29 (master - baeebd0)

2014-01-07 Thread Travis CI
Build Update for lxc/lxc
-

Build: #29
Status: Fixed

Duration: 1 minute and 56 seconds
Commit: baeebd0 (master)
Author: Stéphane Graber
Message: man: Fix comment syntax

Signed-off-by: Stéphane Graber 

View the changeset: 
https://github.com/lxc/lxc/compare/d745b820c29f...baeebd0d7902

View the full build log and details: 
https://travis-ci.org/lxc/lxc/builds/16530846

--

You can configure recipients for build notifications in your .travis.yml file. 
See http://about.travis-ci.org/docs/user/build-configuration



___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [Still Failing] lxc/lxc#28 (master - d745b82)

2014-01-07 Thread Travis CI
Build Update for lxc/lxc
-

Build: #28
Status: Still Failing

Duration: 1 minute and 53 seconds
Commit: d745b82 (master)
Author: Serge Hallyn
Message: lxclock: fix stupid scope error

Signed-off-by: Serge Hallyn 

View the changeset: 
https://github.com/lxc/lxc/compare/8c9c2c6d74fe...d745b820c29f

View the full build log and details: 
https://travis-ci.org/lxc/lxc/builds/16530675

--

You can configure recipients for build notifications in your .travis.yml file. 
See http://about.travis-ci.org/docs/user/build-configuration


___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [lxc/lxc] baeebd: man: Fix comment syntax

2014-01-07 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: baeebd0d79027ccaddf00e33238d26d31a92c221
  https://github.com/lxc/lxc/commit/baeebd0d79027ccaddf00e33238d26d31a92c221
  Author: Stéphane Graber 
  Date:   2014-01-07 (Tue, 07 Jan 2014)

  Changed paths:
M doc/ja/lxc-stop.sgml.in

  Log Message:
  ---
  man: Fix comment syntax

Signed-off-by: Stéphane Graber 


___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [lxc/lxc] d745b8: lxclock: fix stupid scope error

2014-01-07 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: d745b820c29f783dbe7c89a5da37f530e0279f75
  https://github.com/lxc/lxc/commit/d745b820c29f783dbe7c89a5da37f530e0279f75
  Author: Serge Hallyn 
  Date:   2014-01-07 (Tue, 07 Jan 2014)

  Changed paths:
M src/lxc/lxclock.c

  Log Message:
  ---
  lxclock: fix stupid scope error

Signed-off-by: Serge Hallyn 


___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [Broken] lxc/lxc#27 (master - 8c9c2c6)

2014-01-07 Thread Travis CI
Build Update for lxc/lxc
-

Build: #27
Status: Broken

Duration: 1 minute and 47 seconds
Commit: 8c9c2c6 (master)
Author: Serge Hallyn
Message: lxclock: fall back to /tmp if xdg_rundir is not writeable

This happens for instance if you run a test under sudo which
then runs lxc commands under 'su - '

Signed-off-by: Serge Hallyn 
Acked-by: Stéphane Graber 

View the changeset: 
https://github.com/lxc/lxc/compare/38d626f8bee1...8c9c2c6d74fe

View the full build log and details: 
https://travis-ci.org/lxc/lxc/builds/16527390

--

You can configure recipients for build notifications in your .travis.yml file. 
See http://about.travis-ci.org/docs/user/build-configuration



___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [Broken] lxc/lxc#26 (master - 38d626f)

2014-01-07 Thread Travis CI
Build Update for lxc/lxc
-

Build: #26
Status: Broken

Duration: 2 minutes and 30 seconds
Commit: 38d626f (master)
Author: KATOH Yasufumi
Message: doc: Update Japanese lxc-stop(1), lxc.conf(5), lxc-start-ephemeral(1)

* nokill option of lxc-stop (commit 84fbfcb434f5a59680b7f017bbc1d0db0b81a39d)
* lxc.haltsignal in lxc.conf (commit f0f1d8c076ae93d8ecf735c2eeae471e27ca6abd)
* fix sgml (commit d438f5a0ef0f304917e227405d26aef6e7b30303)

Signed-off-by: KATOH Yasufumi 
Acked-by: Stéphane Graber 

View the changeset: 
https://github.com/lxc/lxc/compare/29b10e4f4755...38d626f8bee1

View the full build log and details: 
https://travis-ci.org/lxc/lxc/builds/16527310

--

You can configure recipients for build notifications in your .travis.yml file. 
See http://about.travis-ci.org/docs/user/build-configuration



___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [lxc/lxc] 8c9c2c: lxclock: fall back to /tmp if xdg_rundir is not wr...

2014-01-07 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 8c9c2c6d74febddc8c36bca3b1c57235bb26d228
  https://github.com/lxc/lxc/commit/8c9c2c6d74febddc8c36bca3b1c57235bb26d228
  Author: Serge Hallyn 
  Date:   2014-01-07 (Tue, 07 Jan 2014)

  Changed paths:
M src/lxc/lxclock.c

  Log Message:
  ---
  lxclock: fall back to /tmp if xdg_rundir is not writeable

This happens for instance if you run a test under sudo which
then runs lxc commands under 'su - '

Signed-off-by: Serge Hallyn 
Acked-by: Stéphane Graber 


___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [lxc/lxc] 38d626: doc: Update Japanese lxc-stop(1), lxc.conf(5), lxc...

2014-01-07 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 38d626f8bee1a2163f221f0c274c289a66bc08d2
  https://github.com/lxc/lxc/commit/38d626f8bee1a2163f221f0c274c289a66bc08d2
  Author: KATOH Yasufumi 
  Date:   2014-01-07 (Tue, 07 Jan 2014)

  Changed paths:
M doc/ja/lxc-start-ephemeral.sgml.in
M doc/ja/lxc-stop.sgml.in
M doc/ja/lxc.conf.sgml.in

  Log Message:
  ---
  doc: Update Japanese lxc-stop(1), lxc.conf(5), lxc-start-ephemeral(1)

* nokill option of lxc-stop (commit 84fbfcb434f5a59680b7f017bbc1d0db0b81a39d)
* lxc.haltsignal in lxc.conf (commit f0f1d8c076ae93d8ecf735c2eeae471e27ca6abd)
* fix sgml (commit d438f5a0ef0f304917e227405d26aef6e7b30303)

Signed-off-by: KATOH Yasufumi 
Acked-by: Stéphane Graber 


___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] [PATCH] doc: Update Japanese lxc-stop(1), lxc.conf(5), lxc-start-ephemeral(1)

2014-01-07 Thread Stéphane Graber
On Tue, Jan 07, 2014 at 09:54:15PM +0900, KATOH Yasufumi wrote:
> * nokill option of lxc-stop (commit 84fbfcb434f5a59680b7f017bbc1d0db0b81a39d)
> * lxc.haltsignal in lxc.conf (commit f0f1d8c076ae93d8ecf735c2eeae471e27ca6abd)
> * fix sgml (commit d438f5a0ef0f304917e227405d26aef6e7b30303)
> 
> Signed-off-by: KATOH Yasufumi 

Acked-by: Stéphane Graber  

> ---
>  doc/ja/lxc-start-ephemeral.sgml.in |  2 ++
>  doc/ja/lxc-stop.sgml.in| 55 
> --
>  doc/ja/lxc.conf.sgml.in| 51 ---
>  3 files changed, 72 insertions(+), 36 deletions(-)
> 
> diff --git a/doc/ja/lxc-start-ephemeral.sgml.in 
> b/doc/ja/lxc-start-ephemeral.sgml.in
> index f3d4c19..c673c16 100644
> --- a/doc/ja/lxc-start-ephemeral.sgml.in
> +++ b/doc/ja/lxc-start-ephemeral.sgml.in
> @@ -228,7 +228,9 @@ by KATOH Yasufumi 
>  1
>,
>  
> +  
>  
> +  
>  例
>  
>
> diff --git a/doc/ja/lxc-stop.sgml.in b/doc/ja/lxc-stop.sgml.in
> index e82e772..d21f6a2 100644
> --- a/doc/ja/lxc-stop.sgml.in
> +++ b/doc/ja/lxc-stop.sgml.in
> @@ -60,7 +60,8 @@ by KATOH Yasufumi 
>-r
>-t timeout
>-k
> -  -s
> +  --nokill
> +  --nolock
>  
>
>  
> @@ -71,27 +72,29 @@ by KATOH Yasufumi 
>
>lxc-stop は,リブート,クリーンシャットダウン,コンテナ内の全てのプロセスの kill 
> のどれかを行います.
> -  デフォルトでは,コンテナのクリーンなシャットダウンを (SIGPWR をコンテナに送ることで) 行い,コンテナの終了を 60 
> 秒待ち,return します.
> -  コンテナがクリーンに終了するのに失敗した場合,60 秒待った後,コンテナに 
> lxc.stopsignal で指定したシグナルを送り,強制的にシャットダウンします.
> +  デフォルトでは,コンテナのクリーンなシャットダウンを lxc.haltsignal (デフォルトでは 
> SIGPWR) をコンテナの init プロセスに送ることでリクエストし,コンテナの終了を 60 秒待ち,return します.
> +  コンテナが 60 秒の間にクリーンに終了するのに失敗した場合,lxc.stopsignal 
> (デフォルトでは SIGKILL) を送り,強制的にシャットダウンします.
>  
>  
>  
>
> -  -W, -r, 
> -s, -k オプションは実行する際のアクションを指定します.
> +  -W, -r, 
> -s, -k, 
> --nokill オプションは実行する際のアクションを指定します.
>-W は,指定したアクションの後に,lxc-stop 
> は速やかに終了します.
>一方,-t TIMEOUT 
> はコンテナが完全にシャットダウンやリブートするのを待つ時間の最大値を設定します.
>  
> @@ -118,36 +121,36 @@ by KATOH Yasufumi 
>  
>  
>   
> -   -s,--shutdown 
> +   -k,--kill 
>   
>   
> 
>  
> -クリーンシャットダウンだけをリクエストします.
> -クリーンなシャットダウンに失敗した場合でも,コンテナのタスクを kill しません.
> +Rather than requesting a clean shutdown of the container, explicitly
> +kill all tasks in the container.  This is the legacy
> +lxc-stop behavior.
> +-->
> +   コンテナのクリーンシャットダウンをリクエストするのでなく,明確にコンテナ内の全てのタスクを kill します.
> +これは,以前の lxc-stop の動作です.
> 
>   
> - 
> +
>  
>  
>   
> -   -k,--kill 
> +   --nokill
>   
>   
> 
>  
> -   コンテナのクリーンシャットダウンをリクエストするのでなく,明確にコンテナ内の全てのタスクを kill します.
> -これは,以前の lxc-stop の動作です.
> + Only request a clean shutdown, do not kill the container tasks if 
> the
> + clean shutdown fails.
> +  -->
> +クリーンなシャットダウンのみをリクエストします.
> +クリーンなシャットダウンに失敗した場合でも,コンテナのタスクを kill しません.
> 
>   
> -
> + 
>  
>  
>   
> diff --git a/doc/ja/lxc.conf.sgml.in b/doc/ja/lxc.conf.sgml.in
> index 8aeebd2..d99d33c 100644
> --- a/doc/ja/lxc.conf.sgml.in
> +++ b/doc/ja/lxc.conf.sgml.in
> @@ -210,19 +210,50 @@ by KATOH Yasufumi 
>  
>  
>  
> -  停止時のシグナル
> +  クリーンなシャットダウン時のシグナル
>
>  
> +lxc-stop がコンテナをクリーンにシャットダウンするためにコンテナの init 
> プロセスに送るシグナル名か番号を指定することができます.
> +init システムによって,クリーンなシャットダウンを行うために使うシグナルは異なります.
> +このオプションではシグナルとして kill(1) で使う形式を指定することができます.
> +例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 
> のような形式,もしくは数字を指定します.デフォルトのシグナルは SIGPWR です.
> +  
> +  
> +
> +  
> +lxc.haltsignal
> +  
> +  
> +
> +  
> +  コンテナをシャットダウンするのに使うシグナルを指定します 
> +
> +  
> +
> +  
> +
> +
> +
> +  強制停止時のシグナル
> +  
> +
> -lxc-stop がコンテナをシャットダウンするときに送出するシグナル名か番号を指定可能です.
> -様々な init システムが,クリーンなシャットダウンシーケンスを実行するために,様々なシグナルを用いる可能性があります.
> -オプションとして,シグナルを kill(1) の形式で指定することが可能です.
> -例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式,もしくは数字を指定します.
> +lxc-stop がコンテナを強制的にシャットダウンするために送るシグナル名か番号を指定することができます.
> +このオプションではシグナルとして kill(1) で使う形式を指定することができます.
> +例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 
> のような形式,もしくは数字を指定します.デフォルトのシグナルは SIGKILL です.
>
>
>  
> -- 
> 1.8.4.4
> 
> ___
> lxc-devel mailing list
> lxc-devel@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com


signature.asc
Description: Digital signature
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] [PATCH] lxclock: fall back to /tmp if xdg_rundir is not writeable

2014-01-07 Thread Stéphane Graber
On Mon, Jan 06, 2014 at 11:39:02PM -0600, Serge Hallyn wrote:
> This happens for instance if you run a test under sudo which
> then runs lxc commands under 'su - '
> 
> Signed-off-by: Serge Hallyn 

Acked-by: Stéphane Graber 

> ---
>  src/lxc/lxclock.c | 24 
>  1 file changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/src/lxc/lxclock.c b/src/lxc/lxclock.c
> index 69d3d15..c6f2448 100644
> --- a/src/lxc/lxclock.c
> +++ b/src/lxc/lxclock.c
> @@ -123,11 +123,27 @@ static char *lxclock_name(const char *p, const char *n)
>   }
>   ret = mkdir_p(dest, 0755);
>   if (ret < 0) {
> - free(dest);
> - return NULL;
> - }
> + /* fall back to "/tmp/" $(id -u) "/lxc/" $lxcpath / $lxcname + 
> '\0' */
> + int l2 = 33 + strlen(n) + strlen(p);
> + char *d;
> + if (l2 > len) {
> + d = realloc(dest, l2);
> + if (!d) {
> + free(dest);
> + return NULL;
> + }
> + len = l2;
> + }
> + dest = d;
> + ret = snprintf(dest, len, "/tmp/%d/lxc/%s", geteuid(), p);
> + if (ret < 0 || ret >= len) {
> + free(dest);
> + return NULL;
> + }
> + ret = snprintf(dest, len, "/tmp/%d/lxc/%s/%s", geteuid(), p, n);
> + } else
> + ret = snprintf(dest, len, "%s/lock/lxc/%s/%s", rundir, p, n);
>  
> - ret = snprintf(dest, len, "%s/lock/lxc/%s/%s", rundir, p, n);
>   if (ret < 0 || ret >= len) {
>   free(dest);
>   return NULL;
> -- 
> 1.8.5.2
> 
> ___
> lxc-devel mailing list
> lxc-devel@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com


signature.asc
Description: Digital signature
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [PATCH] doc: Update Japanese lxc-stop(1), lxc.conf(5), lxc-start-ephemeral(1)

2014-01-07 Thread KATOH Yasufumi
* nokill option of lxc-stop (commit 84fbfcb434f5a59680b7f017bbc1d0db0b81a39d)
* lxc.haltsignal in lxc.conf (commit f0f1d8c076ae93d8ecf735c2eeae471e27ca6abd)
* fix sgml (commit d438f5a0ef0f304917e227405d26aef6e7b30303)

Signed-off-by: KATOH Yasufumi 
---
 doc/ja/lxc-start-ephemeral.sgml.in |  2 ++
 doc/ja/lxc-stop.sgml.in| 55 --
 doc/ja/lxc.conf.sgml.in| 51 ---
 3 files changed, 72 insertions(+), 36 deletions(-)

diff --git a/doc/ja/lxc-start-ephemeral.sgml.in 
b/doc/ja/lxc-start-ephemeral.sgml.in
index f3d4c19..c673c16 100644
--- a/doc/ja/lxc-start-ephemeral.sgml.in
+++ b/doc/ja/lxc-start-ephemeral.sgml.in
@@ -228,7 +228,9 @@ by KATOH Yasufumi 
 1
   ,
 
+  
 
+  
 例
 
   
diff --git a/doc/ja/lxc-stop.sgml.in b/doc/ja/lxc-stop.sgml.in
index e82e772..d21f6a2 100644
--- a/doc/ja/lxc-stop.sgml.in
+++ b/doc/ja/lxc-stop.sgml.in
@@ -60,7 +60,8 @@ by KATOH Yasufumi 
   -r
   -t timeout
   -k
-  -s
+  --nokill
+  --nolock
 
   
 
@@ -71,27 +72,29 @@ by KATOH Yasufumi 
   
   lxc-stop は,リブート,クリーンシャットダウン,コンテナ内の全てのプロセスの kill 
のどれかを行います.
-  デフォルトでは,コンテナのクリーンなシャットダウンを (SIGPWR をコンテナに送ることで) 行い,コンテナの終了を 60 
秒待ち,return します.
-  コンテナがクリーンに終了するのに失敗した場合,60 秒待った後,コンテナに lxc.stopsignal 
で指定したシグナルを送り,強制的にシャットダウンします.
+  デフォルトでは,コンテナのクリーンなシャットダウンを lxc.haltsignal (デフォルトでは 
SIGPWR) をコンテナの init プロセスに送ることでリクエストし,コンテナの終了を 60 秒待ち,return します.
+  コンテナが 60 秒の間にクリーンに終了するのに失敗した場合,lxc.stopsignal 
(デフォルトでは SIGKILL) を送り,強制的にシャットダウンします.
 
 
 
   
-  -W, -r, 
-s, -k オプションは実行する際のアクションを指定します.
+  -W, -r, 
-s, -k, --nokill 
オプションは実行する際のアクションを指定します.
   -W は,指定したアクションの後に,lxc-stop 
は速やかに終了します.
   一方,-t TIMEOUT 
はコンテナが完全にシャットダウンやリブートするのを待つ時間の最大値を設定します.
 
@@ -118,36 +121,36 @@ by KATOH Yasufumi 
 
 

- -s,--shutdown 
+ -k,--kill 


  
 
-クリーンシャットダウンだけをリクエストします.
-クリーンなシャットダウンに失敗した場合でも,コンテナのタスクを kill しません.
+Rather than requesting a clean shutdown of the container, explicitly
+kill all tasks in the container.  This is the legacy
+lxc-stop behavior.
+-->
+   コンテナのクリーンシャットダウンをリクエストするのでなく,明確にコンテナ内の全てのタスクを kill します.
+これは,以前の lxc-stop の動作です.
  

-   
+
 
 

- -k,--kill 
+ --nokill


  
 
-   コンテナのクリーンシャットダウンをリクエストするのでなく,明確にコンテナ内の全てのタスクを kill します.
-これは,以前の lxc-stop の動作です.
+   Only request a clean shutdown, do not kill the container tasks if 
the
+   clean shutdown fails.
+  -->
+クリーンなシャットダウンのみをリクエストします.
+クリーンなシャットダウンに失敗した場合でも,コンテナのタスクを kill しません.
  

-
+   
 
 

diff --git a/doc/ja/lxc.conf.sgml.in b/doc/ja/lxc.conf.sgml.in
index 8aeebd2..d99d33c 100644
--- a/doc/ja/lxc.conf.sgml.in
+++ b/doc/ja/lxc.conf.sgml.in
@@ -210,19 +210,50 @@ by KATOH Yasufumi 
 
 
 
-  停止時のシグナル
+  クリーンなシャットダウン時のシグナル
   
 
+lxc-stop がコンテナをクリーンにシャットダウンするためにコンテナの init プロセスに送るシグナル名か番号を指定することができます.
+init システムによって,クリーンなシャットダウンを行うために使うシグナルは異なります.
+このオプションではシグナルとして kill(1) で使う形式を指定することができます.
+例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式,もしくは数字を指定します.デフォルトのシグナルは 
SIGPWR です.
+  
+  
+
+  
+lxc.haltsignal
+  
+  
+
+  
+  コンテナをシャットダウンするのに使うシグナルを指定します 
+
+  
+
+  
+
+
+
+  強制停止時のシグナル
+  
+
-lxc-stop がコンテナをシャットダウンするときに送出するシグナル名か番号を指定可能です.
-様々な init システムが,クリーンなシャットダウンシーケンスを実行するために,様々なシグナルを用いる可能性があります.
-オプションとして,シグナルを kill(1) の形式で指定することが可能です.
-例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式,もしくは数字を指定します.
+lxc-stop がコンテナを強制的にシャットダウンするために送るシグナル名か番号を指定することができます.
+このオプションではシグナルとして kill(1) で使う形式を指定することができます.
+例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式,もしくは数字を指定します.デフォルトのシグナルは 
SIGKILL です.
   
   
 
-- 
1.8.4.4

___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] RFC: cgroups aware proc

2014-01-07 Thread Li Zefan
On 2014/1/5 8:12, Marian Marinov wrote:
> Happy new year guys.
> 
> I need to have /proc cgroups aware, as I want to have LXC containers that see 
> only the resources that are given to them.
> 
> In order to do that I had to patch the kernel. I decided to start with 
> cpuinfo, stat and interrupts and then continue
> with meminfo and loadavg.
> 
> I managed to patch the Kernel (linux 3.12.0) and make /proc/cpuinfo, 
> /proc/stat and /proc/interrupts be cgroups aware.
> 
> Attached are the patches that make the necessary changes.
> 
> The change for /proc/cpuinfo and /proc/interrupts is currently done only for 
> x86 arch, but I will patch the rest of the
> architectures if the style of the patches is acceptable.
> 
> Tomorrow I will check if the patches apply and build with the latest kernel.
> 

People tried to do this before, but got rejected by upstream maintainers,
and then the opinion was to do this in userspace throught FUSE.

Seems libvirt-lxc already supports containerized /proc/meminfo in this way.
See:
http://libvirt.org/drvlxc.html

___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] RFC: cgroups aware proc

2014-01-07 Thread Li Zefan
On 2014/1/5 8:12, Marian Marinov wrote:
> Happy new year guys.
> 
> I need to have /proc cgroups aware, as I want to have LXC containers that see 
> only the resources that are given to them.
> 
> In order to do that I had to patch the kernel. I decided to start with 
> cpuinfo, stat and interrupts and then continue
> with meminfo and loadavg.
> 
> I managed to patch the Kernel (linux 3.12.0) and make /proc/cpuinfo, 
> /proc/stat and /proc/interrupts be cgroups aware.
> 
> Attached are the patches that make the necessary changes.
> 
> The change for /proc/cpuinfo and /proc/interrupts is currently done only for 
> x86 arch, but I will patch the rest of the
> architectures if the style of the patches is acceptable.
> 
> Tomorrow I will check if the patches apply and build with the latest kernel.
> 

People tried to do this before, but got rejected by upstream maintainers,
and then the opinion was to do this in userspace throught FUSE.

Seems libvirt already supports containerized /proc/meminfo in this way.
See:
http://libvirt.org/drvlxc.html

___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] [PATCH] configure.ac: add docbook-to-man to dbparsers

2014-01-07 Thread Qiang Huang
On 2014/1/7 16:07, KATOH Yasufumi wrote:
> Hi,
> 
 On Mon, 6 Jan 2014 20:00:29 +0800
> in message   "Re: [lxc-devel] [PATCH] configure.ac: add docbook-to-man to 
> dbparsers"
>   Qiang Huang-san wrote:
> 
>> This patch works fine for ja man page in my box, do you get any
>> real error messages?
> 
> Oh... sorry. I understand.

That's alright. :)

> 
>> PS: I use docbook2x-0.8.8-47.15 on SUSE11-sp2.
> 
> docbook-to-man is command name, isn't it? I confuse docbook-to-man

Yes, it's a command name, from docbook2x package, which is a
different name from the one for Debian/ubuntu.

> command in docbook2x package of (open)SuSE with docbook-to-man
> software(http://www.oasis-open.org/docbook/tools/dtm/) ;-)
> ___
> lxc-devel mailing list
> lxc-devel@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
> 
> 


___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] [PATCH] configure.ac: add docbook-to-man to dbparsers

2014-01-07 Thread KATOH Yasufumi
Hi,

>>> On Mon, 6 Jan 2014 20:00:29 +0800
in message   "Re: [lxc-devel] [PATCH] configure.ac: add docbook-to-man to 
dbparsers"
  Qiang Huang-san wrote:

> This patch works fine for ja man page in my box, do you get any
> real error messages?

Oh... sorry. I understand.

> PS: I use docbook2x-0.8.8-47.15 on SUSE11-sp2.

docbook-to-man is command name, isn't it? I confuse docbook-to-man
command in docbook2x package of (open)SuSE with docbook-to-man
software(http://www.oasis-open.org/docbook/tools/dtm/) ;-)
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel