Linux Container Development
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: [PATCH] make cr depend on all namespaces
Date: Mon, 15 Mar 2010 17:45:01 -0400	[thread overview]
Message-ID: <4B9EAA5D.1080802@cs.columbia.edu> (raw)
In-Reply-To: <20100315200559.GA25911-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>



Serge E. Hallyn wrote:
> This should let us get rid of some ifdefed code and reduce
> chances for bad config combinations.  There's really no reason
> to support it.

I disagree.

You are right that this will reduce the changes of bad config
combinations.

However, it will also introduce some restrictions on the kernel
config which are unnecessary. Some people may not want to have
all namespaces configured.

Note that the namespaces are independent in the sense that we
don't need to test all combination of all namespaces - instead,
I consider turning on/off one at a time to be safe enough.

(FWIW, is it because you only wanted to show a point that you
only remove UTS_NS ifdefs ?)

Oren.

> 
> Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
>  checkpoint/Kconfig     |    5 +++++
>  checkpoint/namespace.c |   10 ----------
>  2 files changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/checkpoint/Kconfig b/checkpoint/Kconfig
> index 4a2c845..549668e 100644
> --- a/checkpoint/Kconfig
> +++ b/checkpoint/Kconfig
> @@ -9,6 +9,11 @@ config DEFERQUEUE
>  config CHECKPOINT
>  	bool "Checkpoint/restart (EXPERIMENTAL)"
>  	depends on CHECKPOINT_SUPPORT && EXPERIMENTAL
> +	depends on UTS_NS
> +	depends on USER_NS
> +	depends on PID_NS
> +	depends on NET_NS
> +	depends on DEVPTS_MULTIPLE_INSTANCES
>  	depends on CGROUP_FREEZER
>  	select DEFERQUEUE
>  	help
> diff --git a/checkpoint/namespace.c b/checkpoint/namespace.c
> index 4b3ac5a..6389dbd 100644
> --- a/checkpoint/namespace.c
> +++ b/checkpoint/namespace.c
> @@ -63,7 +63,6 @@ static struct uts_namespace *do_restore_uts_ns(struct ckpt_ctx *ctx)
>  	if (IS_ERR(h))
>  		return (struct uts_namespace *) h;
>  
> -#ifdef CONFIG_UTS_NS
>  	uts_ns = create_uts_ns();
>  	if (!uts_ns) {
>  		uts_ns = ERR_PTR(-ENOMEM);
> @@ -78,15 +77,6 @@ static struct uts_namespace *do_restore_uts_ns(struct ckpt_ctx *ctx)
>  	memcpy(name->machine, h->machine, sizeof(name->machine));
>  	memcpy(name->domainname, h->domainname, sizeof(name->domainname));
>  	up_read(&uts_sem);
> -#else
> -	/* complain if image contains multiple namespaces */
> -	if (ctx->stats.uts_ns) {
> -		uts_ns = ERR_PTR(-EEXIST);
> -		goto out;
> -	}
> -	uts_ns = current->nsproxy->uts_ns;
> -	get_uts_ns(uts_ns);
> -#endif
>  
>  	ctx->stats.uts_ns++;
>   out:

  parent reply	other threads:[~2010-03-15 21:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 20:05 [PATCH] make cr depend on all namespaces Serge E. Hallyn
     [not found] ` <20100315200559.GA25911-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-15 20:22   ` Nathan Lynch
2010-03-15 21:45   ` Oren Laadan [this message]
     [not found]     ` <4B9EAA5D.1080802-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-03-15 21:52       ` Serge E. Hallyn
     [not found]         ` <20100315215244.GA5791-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2010-03-15 22:09           ` Oren Laadan
     [not found]             ` <4B9EB02C.8000204-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-03-15 22:23               ` Serge E. Hallyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B9EAA5D.1080802@cs.columbia.edu \
    --to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox