Re: [Devel] [PATCH v3 7/9] modify tar extraction to account for user namespace

2013-05-13 Thread Glauber Costa
On 05/11/2013 03:53 AM, Igor M Podlesny wrote: On 30 April 2013 13:16, Glauber Costa glom...@openvz.org wrote: From: Glauber Costa glom...@parallels.com To work around that, we can employ a trick to allow container creation right now, as well as to avoid compatibility problems: we will resort

Re: [Devel] [PATCH 3/3] hooks_ct: fix ub limits setting for upstream containers

2013-05-13 Thread Glauber Costa
On 05/11/2013 05:07 AM, Igor M Podlesny wrote: On 30 April 2013 11:46, Glauber Costa glom...@openvz.org wrote: Currently, vps_setup_res() have an explicit test for state != VPS_STARTING before applying beancounter limits. This means that we can set limits without further problems when the

Re: [Devel] [PATCH v3 4/9] user namespace support for upstream containers

2013-05-13 Thread Glauber Costa
On 05/11/2013 04:14 AM, Igor M Podlesny wrote: On 30 April 2013 13:16, Glauber Costa glom...@openvz.org wrote: @@ -576,7 +765,9 @@ int ct_do_open(vps_handler *h, vps_param *param) { int ret; char path[STR_SIZE]; + char upath[STR_SIZE]; struct stat st; +

Re: [Devel] [PATCH 3/3] hooks_ct: fix ub limits setting for upstream containers

2013-05-13 Thread Glauber Costa
On 05/13/2013 12:11 PM, Igor M Podlesny wrote: On 13 May 2013 16:11, Glauber Costa glom...@parallels.com wrote: On 05/13/2013 12:08 PM, Igor M Podlesny wrote: On 13 May 2013 15:50, Glauber Costa glom...@parallels.com wrote: [...] Aren't macroses supposed to be UPPER CASE named? Yes, and

Re: [Devel] [PATCH 3/3] hooks_ct: fix ub limits setting for upstream containers

2013-05-13 Thread Igor M Podlesny
On 13 May 2013 16:16, Glauber Costa glom...@parallels.com wrote: On 05/13/2013 12:11 PM, Igor M Podlesny wrote: On 13 May 2013 16:11, Glauber Costa glom...@parallels.com wrote: On 05/13/2013 12:08 PM, Igor M Podlesny wrote: On 13 May 2013 15:50, Glauber Costa glom...@parallels.com wrote:

[Devel] [PATCH 0/7] RFC: bitbucket.org/poige/vzctl/commits/all/tip/p_scale

2013-05-13 Thread Igor Podlesny
https://bitbucket.org/poige/vzctl/commits/all/tip/p_scale Igor Podlesny (7): SCALE_UBC: to support terminating ; properly SCALE_PARAM: to support terminating ; properly scale(): undefine macroses bound to local variables SCALE_PARAM, SCALE_UBC gets shorter Major rewrite of scale() with

[Devel] [PATCH 1/7] SCALE_UBC: to support terminating ; properly

2013-05-13 Thread Igor Podlesny
-- Similar to commit 670b1af07e5d0402b139e5678651118567695275 Also since lots of lines were touched anyway I aligned second arguments to increase code readability. --- src/vzcfgscale.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff

[Devel] [PATCH 2/7] SCALE_PARAM: to support terminating ; properly

2013-05-13 Thread Igor Podlesny
-- Similar to commit 670b1af07e5d0402b139e5678651118567695275 --- src/vzcfgscale.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vzcfgscale.c b/src/vzcfgscale.c index d78e40b..55fd25e 100644 --- a/src/vzcfgscale.c +++ b/src/vzcfgscale.c @@ -103,7 +103,7 @@ do {

[Devel] [PATCH 4/7] SCALE_PARAM, SCALE_UBC gets shorter

2013-05-13 Thread Igor Podlesny
Both macroses started with framing if() so we don't have to bring in artificial do {} while (0) loop --- src/vzcfgscale.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/vzcfgscale.c b/src/vzcfgscale.c index 99f871d..414aec5 100644 --- a/src/vzcfgscale.c +++

[Devel] [PATCH 5/7] Major rewrite of scale() with new macro MUL_BOUND

2013-05-13 Thread Igor Podlesny
-- 2 new macroses brought in: MIN_OF and MUL_BOUND; -- Actually NOT needed local variables removed. --- include/util.h |5 + src/vzcfgscale.c | 34 ++ 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/include/util.h b/include/util.h index

[Devel] [PATCH 6/7] scale(): got rid of awkward continue in loop

2013-05-13 Thread Igor Podlesny
As a side edit: init in declaration and not needed {} removal --- src/vzcfgscale.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/vzcfgscale.c b/src/vzcfgscale.c index 7fc466a..36db710 100644 --- a/src/vzcfgscale.c +++ b/src/vzcfgscale.c @@ -118,14 +118,11

[Devel] [PATCH 7/7] Now it's obvious SCALE_UBC and SCALE_PARAM are aliases

2013-05-13 Thread Igor Podlesny
Lets use SCALE_PARAM since it's more general --- src/vzcfgscale.c | 49 + 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/src/vzcfgscale.c b/src/vzcfgscale.c index 36db710..0504218 100644 --- a/src/vzcfgscale.c +++

[Devel] [PATCH] RFC: rewrite vzctl acction strcmp()s as array lookup

2013-05-13 Thread Igor Podlesny
--- src/vzctl.c | 149 --- 1 file changed, 80 insertions(+), 69 deletions(-) diff --git a/src/vzctl.c b/src/vzctl.c index 359bcde..37fda15 100644 --- a/src/vzctl.c +++ b/src/vzctl.c @@ -123,18 +123,79 @@ static void usage(int rc)

Re: [Devel] [PATCH v3 0/9] Upstream Linux support for userns

2013-05-13 Thread Kir Kolyshkin
On 04/29/2013 10:16 PM, Glauber Costa wrote: Kir, Please review the following patchset. The main difference from last version is that we support running with userns disabled even if it is present. This effectively means that containers that were already created and owned by root will keep

Re: [Devel] [PATCH v3 4/9] user namespace support for upstream containers

2013-05-13 Thread Kir Kolyshkin
Oh my, four cases of whitespace-at-eol which I had to fixed manually. Wanted to apply it nevertheless and fix some things myself, but then the list grew out too big. Plus please see inline. On 04/29/2013 10:16 PM, Glauber Costa wrote: From: Glauber Costa glom...@parallels.com This patch

Re: [Devel] [PATCH v3 6/9] allow local uid and gid to be specified at container creation

2013-05-13 Thread Kir Kolyshkin
On 04/29/2013 10:16 PM, Glauber Costa wrote: From: Glauber Costa glom...@parallels.com It is a valid use case to run a container with host uid and gid different than the default. In particular, already deployed versions of vzctl are expected to have this value unset, effectively meaning they

Re: [Devel] [PATCH v3 7/9] modify tar extraction to account for user namespace

2013-05-13 Thread Kir Kolyshkin
On 04/29/2013 10:16 PM, Glauber Costa wrote: From: Glauber Costa glom...@parallels.com If we are running upstream with user namespaces, we need to create the container filesystem not with the ownership preserved, but reflecting the mapping we need to apply. Note that according to our