[CRIU] [PATCH] Allow dumping of pstore, securityfs, fusectl, debugfs

Serge Hallyn serge.hallyn at ubuntu.com
Mon Jun 9 10:46:28 PDT 2014


Quoting Tycho Andersen (tycho.andersen at canonical.com):
> Hi Pavel,
> 
> On Mon, Jun 09, 2014 at 08:25:39PM +0400, Pavel Emelyanov wrote:
> > On 06/09/2014 08:04 PM, Tycho Andersen wrote:
> > >
> > > +
> > >  static struct fstype fstypes[] = {
> > >  	{
> > >  		.name = "unsupported",
> > > @@ -738,6 +750,22 @@ static struct fstype fstypes[] = {
> > >  	}, {
> > >  		.name = "btrfs",
> > >  		.code = FSTYPE__UNSUPPORTED,
> > > +	}, {
> > > +		.name = "pstore",
> > > +		.dump = pstore_dump,
> > > +		.code = FSTYPE__PSTORE,
> > 
> > I haven't worked with pstore, thus the question -- what if we
> > just umount it on one box and mount on another without doing
> > anything about preserving its contents. Will it affect the container?
> 
> pstore is "platform persistent storage", so it should not be migrated
> with the container. The only real reason it is here is because
> ubuntu's mountall wants to mount it. The default apparmor rules
> disallow changes by containers to all of these filesystems.
> 
> After some discussion with Serge Hallyn, it sounds like at some point
> in the future we might allow writes to /sys/fs/fuse, but for now we
> don't. All this patch really does for us is allow dump to complete
> successfully so we can start working on restore.

Right, all of these filesystems are mounted in ubuntu containers 
(because otherwise mountall has a fit), but apparmor prevents
writes under all of them.

> The other changes you suggested are below.
> 
> 
> 
> These are mounted by default in ubuntu containers, so criu should know about
> them and remount them on restore.

More importantly, criu should at least not abort checkpoint on
seeing them.  That is blocking our going on to the next issues
(which looks like it'll be a plugin to c/r the cgroup state :)

If criu didn't actually remount them then restart should go fine,
but if the container then reboots mountall will hang.

> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> ---
>  mount.c            | 12 ++++++++++++
>  protobuf/mnt.proto |  4 ++++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/mount.c b/mount.c
> index d770e14..e7a4fd2 100644
> --- a/mount.c
> +++ b/mount.c
> @@ -738,6 +738,18 @@ static struct fstype fstypes[] = {
>  	}, {
>  		.name = "btrfs",
>  		.code = FSTYPE__UNSUPPORTED,
> +	}, {
> +		.name = "pstore",
> +		.dump = pstore_dump,
> +	}, {
> +		.name = "securityfs",
> +		.dump = securityfs_dump,
> +	}, {
> +		.name = "fusectl",
> +		.dump = fusectl_dump,
> +	}, {
> +		.name = "debugfs",
> +		.dump = debugfs_dump,
>  	}
>  };
>  
> diff --git a/protobuf/mnt.proto b/protobuf/mnt.proto
> index ab85de7..297bcbd 100644
> --- a/protobuf/mnt.proto
> +++ b/protobuf/mnt.proto
> @@ -7,6 +7,10 @@ enum fstype {
>  	TMPFS			= 5;
>  	DEVPTS			= 6;
>  	SIMFS			= 7;
> +	PSTORE			= 8;
> +	SECURITYFS		= 9;
> +	FUSECTL			= 10;
> +	DEBUGFS			= 11;
>  };
>  
>  message mnt_entry {
> -- 
> 1.9.1
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list