[lxc-devel] [lxc/lxc] ea720f: sync: add LXC_SYNC_ERROR to report errors from ano...
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: ea720ff1d0bf82557888b400e8866227f7545cc1 https://github.com/lxc/lxc/commit/ea720ff1d0bf82557888b400e8866227f7545cc1 Author: Aleksandr MezinDate: 2016-03-24 (Thu, 24 Mar 2016) Changed paths: M src/lxc/sync.c M src/lxc/sync.h Log Message: --- sync: add LXC_SYNC_ERROR to report errors from another process. Signed-off-by: Aleksandr Mezin Commit: d1ccb562a9d71fe94c5b93706233d1a00280600e https://github.com/lxc/lxc/commit/d1ccb562a9d71fe94c5b93706233d1a00280600e Author: Aleksandr Mezin Date: 2016-03-24 (Thu, 24 Mar 2016) Changed paths: M src/lxc/start.c Log Message: --- start: use LXC_SYNC_ERROR to report errors. This gives more meaningful error message than "invalid sequence". Signed-off-by: Aleksandr Mezin Commit: f8dd0275593f14fa58c3393bb56e83e8d74cae09 https://github.com/lxc/lxc/commit/f8dd0275593f14fa58c3393bb56e83e8d74cae09 Author: Aleksandr Mezin Date: 2016-03-24 (Thu, 24 Mar 2016) Changed paths: M src/lxc/utils.c M src/lxc/utils.h Log Message: --- utils: split null_stdfds() to open_devnull() and set_stdfds() Signed-off-by: Aleksandr Mezin Commit: c44de748afb0080271f6a68bc5defb2c74516859 https://github.com/lxc/lxc/commit/c44de748afb0080271f6a68bc5defb2c74516859 Author: Aleksandr Mezin Date: 2016-03-24 (Thu, 24 Mar 2016) Changed paths: M src/lxc/start.c Log Message: --- start: open /dev/null from "host" /dev Sometimes, a container doesn't have /dev/null. For example, I have this problem with Android container. This fixes #910 (github) for me. Signed-off-by: Aleksandr Mezin Commit: e9058dea83a514f6e5e0ef69fa48565efe65b261 https://github.com/lxc/lxc/commit/e9058dea83a514f6e5e0ef69fa48565efe65b261 Author: Serge Hallyn Date: 2016-03-24 (Thu, 24 Mar 2016) Changed paths: M src/lxc/start.c M src/lxc/sync.c M src/lxc/sync.h M src/lxc/utils.c M src/lxc/utils.h Log Message: --- Merge pull request #917 from amezin/master Fix daemonized containers without autodev and/or /dev mount Compare: https://github.com/lxc/lxc/compare/07e4c41f2963...e9058dea83a5___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel
[lxc-devel] [lxc/lxc] 07e4c4: lxc-busybox: Remove warning for dynamically linked...
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 07e4c41f2963d73b9aedd552c74f17a33e89f020 https://github.com/lxc/lxc/commit/07e4c41f2963d73b9aedd552c74f17a33e89f020 Author: Bogdan PurcareataDate: 2016-03-24 (Thu, 24 Mar 2016) Changed paths: M templates/lxc-busybox.in Log Message: --- lxc-busybox: Remove warning for dynamically linked Busybox The warning has been present since commit 32b37181ea (with no purpose stated). Support for dynamically linked Busybox has been added since commit bf6cc73696. Haven't encountered any issues with dynamically linked Busybox in my last 2 years' testing. Signed-off-by: Bogdan Purcareata 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] lxc-busybox: Remove warning for dynamically linked Busybox
On Thu, Mar 24, 2016 at 11:54:27AM +, Bogdan Purcareata wrote: > The warning has been present since commit 32b37181ea (with no purpose stated). > Support for dynamically linked Busybox has been added since commit bf6cc73696. > Haven't encountered any issues with dynamically linked Busybox in my last > 2 years' testing. > > Signed-off-by: Bogdan PurcareataAcked-by: Stéphane Graber > --- > templates/lxc-busybox.in | 7 --- > 1 file changed, 7 deletions(-) > > diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in > index f547f9e..336fa12 100644 > --- a/templates/lxc-busybox.in > +++ b/templates/lxc-busybox.in > @@ -304,13 +304,6 @@ configure_busybox() > return 1 > fi > > -file -L $(which busybox) | grep -q "statically linked" > -if [ $? -ne 0 ]; then > -echo "warning : busybox is not statically linked." > -echo "warning : The template script may not correctly" > -echo "warning : setup the container environment." > -fi > - > # copy busybox in the rootfs > cp $(which busybox) $rootfs/bin > if [ $? -ne 0 ]; then > -- > 1.9.1 > > ___ > 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: PGP signature ___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel
[lxc-devel] [lxc/lxc] cd27b6: lxc.spec.in: fixed hardcoded path to lxc-net confi...
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: cd27b6c8103d9255b78576dc9474aabfa2493fb6 https://github.com/lxc/lxc/commit/cd27b6c8103d9255b78576dc9474aabfa2493fb6 Author: Johannes KastlDate: 2016-03-24 (Thu, 24 Mar 2016) Changed paths: M lxc.spec.in Log Message: --- lxc.spec.in: fixed hardcoded path to lxc-net config file Signed-off-by: Johannes Kastl Commit: cce8b5cf1d43a1027d9c1ae66613600c2d87ed25 https://github.com/lxc/lxc/commit/cce8b5cf1d43a1027d9c1ae66613600c2d87ed25 Author: Stéphane Graber Date: 2016-03-24 (Thu, 24 Mar 2016) Changed paths: M lxc.spec.in Log Message: --- Merge pull request #916 from ojkastl/20160324_Fix_path_to_lxc-net_config lxc.spec.in: fixed hardcoded path to lxc-net config file Compare: https://github.com/lxc/lxc/compare/28711463f8c3...cce8b5cf1d43___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel
[lxc-devel] [lxc/master] Fix daemonized containers without autodev and/or /dev mount
The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/917 This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === I have a container whose /dev is populated by its /init, so I don't need autodev hook. However, recent versions of LXC (starting from 1.1, I think) try to open /dev/null from container's rootfs when starting daemonized. I moved redirection to /dev/null before root switch, so now container's init will be connected to host's /dev/null. I think it shouldn't break anything or cause a security problem. Also, the error message was a bit confusing ("unexpected sequence number"). I tried to improve it here too. This PR fixes #910. From ea720ff1d0bf82557888b400e8866227f7545cc1 Mon Sep 17 00:00:00 2001 From: Aleksandr MezinDate: Thu, 24 Mar 2016 17:54:26 +0600 Subject: [PATCH 1/3] sync: add LXC_SYNC_ERROR to report errors from another process. Signed-off-by: Aleksandr Mezin --- src/lxc/sync.c | 7 +++ src/lxc/sync.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/lxc/sync.c b/src/lxc/sync.c index 52e02ae..f06d302 100644 --- a/src/lxc/sync.c +++ b/src/lxc/sync.c @@ -27,6 +27,7 @@ #include #include +#include "sync.h" #include "log.h" #include "start.h" @@ -46,6 +47,12 @@ static int __sync_wait(int fd, int sequence) if (!ret) return 0; + if (sync == LXC_SYNC_ERROR) { + ERROR("An error occurred in another process " + "(expected sequence number %d)", sequence); + return -1; + } + if (sync != sequence) { ERROR("invalid sequence number %d. expected %d", sync, sequence); diff --git a/src/lxc/sync.h b/src/lxc/sync.h index 930fcb3..d0aee6f 100644 --- a/src/lxc/sync.h +++ b/src/lxc/sync.h @@ -32,6 +32,7 @@ enum { LXC_SYNC_POST_CGROUP, LXC_SYNC_RESTART, LXC_SYNC_POST_RESTART, + LXC_SYNC_ERROR = -1 /* Used to report errors from another process */ }; int lxc_sync_init(struct lxc_handler *handler); From d1ccb562a9d71fe94c5b93706233d1a00280600e Mon Sep 17 00:00:00 2001 From: Aleksandr Mezin Date: Thu, 24 Mar 2016 17:55:03 +0600 Subject: [PATCH 2/3] start: use LXC_SYNC_ERROR to report errors. This gives more meaningful error message than "invalid sequence". Signed-off-by: Aleksandr Mezin --- src/lxc/start.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index 3e51ad5..bb7009b 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -868,9 +868,9 @@ static int do_start(void *data) handler->ops->start(handler, handler->data); out_warn_father: - /* we want the parent to know something went wrong, so any -* value other than what it expects is ok. */ - lxc_sync_wake_parent(handler, LXC_SYNC_POST_CONFIGURE); + /* we want the parent to know something went wrong, so we return a special +* error code. */ + lxc_sync_wake_parent(handler, LXC_SYNC_ERROR); return -1; } From 9bade5290c4fecbd6f6941d11288abe51eec6553 Mon Sep 17 00:00:00 2001 From: Aleksandr Mezin Date: Thu, 24 Mar 2016 18:46:17 +0600 Subject: [PATCH 3/3] start: open /dev/null from "host" /dev Sometimes, a container doesn't have /dev/null. For example, I have this problem with Android container. This fixes #910 (github) for me. Signed-off-by: Aleksandr Mezin --- src/lxc/start.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index bb7009b..83a0141 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -788,6 +788,10 @@ static int do_start(void *data) } #endif + /* Use host's /dev/null. The container sometimes doesn't have it */ + if (handler->backgrounded && null_stdfds() < 0) + goto out_warn_father; + /* Setup the container, ip, names, utsname, ... */ if (lxc_setup(handler)) { ERROR("failed to setup the container"); @@ -853,9 +857,6 @@ static int do_start(void *data) close(handler->sigfd); - if (handler->backgrounded && null_stdfds() < 0) - goto out_warn_father; - if (cgns_supported() && unshare(CLONE_NEWCGROUP) != 0) { SYSERROR("Failed to unshare cgroup namespace"); goto out_warn_father; ___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel
[lxc-devel] [PATCH] lxc-busybox: Remove warning for dynamically linked Busybox
The warning has been present since commit 32b37181ea (with no purpose stated). Support for dynamically linked Busybox has been added since commit bf6cc73696. Haven't encountered any issues with dynamically linked Busybox in my last 2 years' testing. Signed-off-by: Bogdan Purcareata--- templates/lxc-busybox.in | 7 --- 1 file changed, 7 deletions(-) diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in index f547f9e..336fa12 100644 --- a/templates/lxc-busybox.in +++ b/templates/lxc-busybox.in @@ -304,13 +304,6 @@ configure_busybox() return 1 fi -file -L $(which busybox) | grep -q "statically linked" -if [ $? -ne 0 ]; then -echo "warning : busybox is not statically linked." -echo "warning : The template script may not correctly" -echo "warning : setup the container environment." -fi - # copy busybox in the rootfs cp $(which busybox) $rootfs/bin if [ $? -ne 0 ]; then -- 1.9.1 ___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel
[lxc-devel] [linuxcontainers.org/master] Add Japanese release announcement of LXD 2.0.o.rc6 and fix typo
The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/linuxcontainers.org/pull/165 This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: KATOH YasufumiFrom b3a635ba2de387b9789398ab7513f8923b42e3a0 Mon Sep 17 00:00:00 2001 From: KATOH Yasufumi Date: Thu, 24 Mar 2016 18:38:14 +0900 Subject: [PATCH] Add Japanese release announcement of LXD 2.0.o.rc6 and fix typo Signed-off-by: KATOH Yasufumi --- content/lxd/news.ja.md | 41 + content/lxd/news.md| 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/content/lxd/news.ja.md b/content/lxd/news.ja.md index 26de420..408d162 100644 --- a/content/lxd/news.ja.md +++ b/content/lxd/news.ja.md @@ -1,6 +1,47 @@ ![Download icon](/static/img/containers.png) # News +## LXD 2.0.0.rc6 リリースのお知らせ 2016 年 3 月 23 日 + +### このリリースの主な変更点 + +* 新たにデーモンに "setup mode" が追加されました。これは LXD デーモンが起動した後、コンテナが起動し始める前に、LXD デーモンに対して設定を行う間に使う状態です + + * "lxc config device" と "lxc profile device" コマンドに "get"、"set"、"unset" コマンドを追加しました + * "lxc list" で壊れたコンテナを表示しないのではなく "ERROR" と表示するようになりました + + +### バグ修正 + + * lxd init: サーバアドレスの指定にはポートは不要であることを表示するようにしました + * lxd init: 空のパスワードを受け付けるようになりました + * lxd init: 8443 番ポートを推奨するように表示するようにしました + * README: docker と default プロファイルを適用するようにドキュメントに記載しました (訳注: LXD コンテナ内部で docker を動作させる場合) + * IsMock を MockMode にリネームしました (訳注: プログラム内部の変数の名前の話) + * デーモン初期化処理をきれいに整理しました + * startDaemon 関数を消去しました + * main.go 内の関数名を整えました + * waitready の改良を行いました (訳注: デーモンが内部的にきちんと処理可能状態になるのを待つようになった) + * 新しいデバイスノードのパーミッションの問題を修正しました + * ブリッジが無効化されていても停止できるようになりました + * いくつか lxd-bridge の修正を行いました + * lxd-bridge: shellcheck の結果が良くなるように修正しました + +### 試用環境 + + +この新しい LXD のリリースが、すでに私たちの [デモサービス](/ja/lxd/try-it/) で利用できます。 + +### ダウンロード + +このリリースの tarball は [ダウンロードページ](/lxd/downloads/) から取得できます。 + + ## LXD 2.0.0.rc5 リリースのお知らせ 2016 年 3 月 21 日 ### このリリースの主な変更点 diff --git a/content/lxd/news.md b/content/lxd/news.md index 646878d..ffca8a5 100644 --- a/content/lxd/news.md +++ b/content/lxd/news.md @@ -14,7 +14,7 @@ * lxd init: clarify no port is wanted with server address * lxd init: accept empty trust password - * lxd init: recommend port 8843 + * lxd init: recommend port 8443 * README: document composing docker and default profiles. * Rename IsMock to MockMode * Cleanup daemon initialization ___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel
[lxc-devel] [lxc/master] lxc.spec.in: fixed hardcoded path to lxc-net config file
The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/916 This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Fix the hardcoded path to the lxc-net config file in the lxc.spec.in Signed-off-by: Johannes KastlFrom cd27b6c8103d9255b78576dc9474aabfa2493fb6 Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Thu, 24 Mar 2016 09:26:28 +0100 Subject: [PATCH] lxc.spec.in: fixed hardcoded path to lxc-net config file Signed-off-by: Johannes Kastl --- lxc.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxc.spec.in b/lxc.spec.in index d0816d3..9cc8dc5 100644 --- a/lxc.spec.in +++ b/lxc.spec.in @@ -169,7 +169,7 @@ fi %post # This test should trigger a network configure on a new install. -if [ ! -f %{_sysconfdir}/sysconfig/lxc-net ] || ! grep -q 'USE_LXC_BRIDGE=' %{_sysconfdir}/sysconfig/lxc-net +if [ ! -f @LXC_DISTRO_SYSCONF@/lxc-net ] || ! grep -q 'USE_LXC_BRIDGE=' @LXC_DISTRO_SYSCONF@/lxc-net then # Grab a random 10net subnet. Need to add test logic... while [ true ] @@ -181,7 +181,7 @@ then fi done - cat > %{_sysconfdir}/sysconfig/lxc-net < @LXC_DISTRO_SYSCONF@/lxc-net <___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel
[lxc-devel] [lxc/master] lxc.spec.in: fixed hardcoded path to lxc-net config file
The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/915 This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Fix the hardcoded path to the lxc-net config file in the lxc.spec.in P.S.: First pull request via github, sorry if I make mistakes... From bf3843213405d02d905a1392631a991828cd1743 Mon Sep 17 00:00:00 2001 From: Johannes KastlDate: Thu, 24 Mar 2016 09:16:53 +0100 Subject: [PATCH] lxc.spec.in: fixed hardcoded path to lxc-net config file --- lxc.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxc.spec.in b/lxc.spec.in index d0816d3..9cc8dc5 100644 --- a/lxc.spec.in +++ b/lxc.spec.in @@ -169,7 +169,7 @@ fi %post # This test should trigger a network configure on a new install. -if [ ! -f %{_sysconfdir}/sysconfig/lxc-net ] || ! grep -q 'USE_LXC_BRIDGE=' %{_sysconfdir}/sysconfig/lxc-net +if [ ! -f @LXC_DISTRO_SYSCONF@/lxc-net ] || ! grep -q 'USE_LXC_BRIDGE=' @LXC_DISTRO_SYSCONF@/lxc-net then # Grab a random 10net subnet. Need to add test logic... while [ true ] @@ -181,7 +181,7 @@ then fi done - cat > %{_sysconfdir}/sysconfig/lxc-net < @LXC_DISTRO_SYSCONF@/lxc-net <___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel
[lxc-devel] [lxc/lxc] 6ab1ca: lxc-busybox: Touch /etc/fstab in the container roo...
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 6ab1ca0375feeb00070f0c0f9186551b08b1ee5e https://github.com/lxc/lxc/commit/6ab1ca0375feeb00070f0c0f9186551b08b1ee5e Author: Bogdan PurcareataDate: 2016-03-24 (Thu, 24 Mar 2016) Changed paths: M templates/lxc-busybox.in Log Message: --- lxc-busybox: Touch /etc/fstab in the container rootfs Signed-off-by: Bogdan Purcareata Commit: 28711463f8c3496ddace71f2d5f6b771dd1f3ab8 https://github.com/lxc/lxc/commit/28711463f8c3496ddace71f2d5f6b771dd1f3ab8 Author: Christian Brauner Date: 2016-03-24 (Thu, 24 Mar 2016) Changed paths: M templates/lxc-busybox.in Log Message: --- Merge pull request #914 from brauner/2016-03-23/Purcarea_Bogdan lxc-busybox: Touch /etc/fstab in the container rootfs Compare: https://github.com/lxc/lxc/compare/173e82050f9c...28711463f8c3___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel
[lxc-devel] [lxc/master] lxc-busybox: Touch /etc/fstab in the container rootfs
The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/914 This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Bogdan PurcareataFrom 6ab1ca0375feeb00070f0c0f9186551b08b1ee5e Mon Sep 17 00:00:00 2001 From: Bogdan Purcareata Date: Tue, 22 Mar 2016 13:33:57 + Subject: [PATCH] lxc-busybox: Touch /etc/fstab in the container rootfs Signed-off-by: Bogdan Purcareata --- templates/lxc-busybox.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in index c020e66..f547f9e 100644 --- a/templates/lxc-busybox.in +++ b/templates/lxc-busybox.in @@ -330,6 +330,9 @@ configure_busybox() # relink /sbin/init ln $rootfs/bin/busybox $rootfs/sbin/init +# /etc/fstab must exist for "mount -a" +touch $rootfs/etc/fstab + # passwd exec must be setuid chmod +s $rootfs/bin/passwd touch $rootfs/etc/shadow ___ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel