[lxc-devel] [PATCH 1/2] c/r: refactor the way we pass data to criu/scripts

Serge Hallyn serge.hallyn at ubuntu.com
Fri Oct 17 12:46:21 UTC 2014


Quoting Tycho Andersen (tycho.andersen at canonical.com):
> On Thu, Oct 16, 2014 at 08:53:03PM +0000, Serge Hallyn wrote:
> > Quoting Tycho Andersen (tycho.andersen at canonical.com):
> > > We previously wrote a bunch of files (eth*, veth*, and bridge*) as hard coded
> > > files which we used as the names of interfaces to restore via criu's
> > > --veth-pair. This meant that if people, e.g. gave a different bridge on their
> > > new host, we would use our saved bridge in bridge* and try to restore to the
> > > wrong bridge. Instead, we can just generate a new veth id (if the user hasn't
> > > provided one), and use whatever the user configured values for the interface
> > > name and bridge are.
> > > 
> > > This allows people to switch the bridge that they restore onto simply by
> > > migrating the rootfs and config, and then changing the bridge name in the
> > > container's configuration before running lxc-checkpoint.
> > > 
> > > Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> > 
> > Mostly looks good, but two things.
> > 
> > Should we be concerned about API version .vs. criu?  I'm not sure how
> > we can coordinate it (maybe a 'criu --get-apiversion' before we do an
> > actual checkpoint/restore), and I'm not sure it's worth doing so as
> > persumably serious api changes will stop when we get at all stable...
> > but I'm not certain.
> 
> We could do a criu --version, but I don't think that any of the
> changes here actually care about what version of criu is being used;
> these are all internal changes on how we manage the network restore.
> 
> Anyway, if you don't mind the extra fork() and criu --version call, I
> am happy to send a patch that checks it.

Oh, then I misunderstood.  I thought this new way would require a particular
criu to work.

So we can punt on the api question.  Though i suspect '--version' will be
an inadequate solution if/when we need it, as criu versions last a few
months.

thanks,
-serge


More information about the lxc-devel mailing list