[CRIU] Towards an in-process libcriu

Ruslan Kuprieiev kupruser at gmail.com
Wed Jul 16 13:59:32 PDT 2014


Hi Saied,

We already have RPC and libcriu, and both have C bindings. In fact, from 
within
any program one can call dump, restore etc to do what was done in past 
only on
the command line ;). Why is running criu service is such a big problem? =)

Thanks,
Ruslan

On 16.07.2014 23:41, Saied Kazemi wrote:
> Having libcriu with C bindings is a great feature.  In addition to LXC 
> as Tycho has mentioned, other Docker exec drivers will be able to use 
> it too.  In fact, from within any program, one would call dump() and 
> restore() to do what is currently done on the command line.
>
> --Saied
>
>
>
> On Wed, Jul 16, 2014 at 12:49 PM, Tycho Andersen 
> <tycho.andersen at canonical.com <mailto:tycho.andersen at canonical.com>> 
> wrote:
>
>     Hi Ruslan,
>
>     On Wed, Jul 16, 2014 at 10:42:57PM +0300, Ruslan Kuprieiev wrote:
>     > Hi Tycho,
>     >
>     > On 16.07.2014 22:22, Tycho Andersen wrote:
>     > >Hi Ruslan,
>     > >
>     > >On Wed, Jul 16, 2014 at 10:16:01PM +0300, Ruslan Kuprieiev wrote:
>     > >>So, that lib would do smth like fork+exec criu? And criu process
>     > >>would be in the
>     > >>tree that you want to dump, right?
>     > >The way I was thinking of libcriu is just as a set of c functions:
>     > >
>     > >void dump(pid_t, ...);
>     > >bool restore(char *image_dir, ...);
>     > >
>     > >that you could call and criu would do what it normally does
>     (although
>     > >probably this implies --restore-detached, among other things), so
>     > >there wouldn't be any forking to start the criu daemon.
>     >
>     > So, basically, you want to make the whole criu to be a lib?
>
>     Yes, that's what I'm after.
>
>     > And the process, that would use this lib, would be in the same tree
>     > you are trying
>     > to dump? The problem is criu wouldn't be able to separate it's own
>     > resources from
>     > those it is trying to dump.
>
>     No, it is a separate process tree, for which I know the pid, but is
>     unrelated to the process that I'd be calling dump() from.
>
>     Tycho
>     _______________________________________________
>     CRIU mailing list
>     CRIU at openvz.org <mailto:CRIU at openvz.org>
>     https://lists.openvz.org/mailman/listinfo/criu
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140716/38f4dc27/attachment.html>


More information about the CRIU mailing list