[CRIU] Towards an in-process libcriu
Ruslan Kuprieiev
kupruser at gmail.com
Wed Jul 16 12:42:57 PDT 2014
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?
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.
> If such a
> thing doesn't exist, the next way to do it would simply be to fork a
> criu daemon, pass it a message, wait for it to finish, and then kill
> the criu daemon.
>
> Tycho
>
>> On 16.07.2014 21:41, Tycho Andersen wrote:
>>> Hi Ruslan,
>>>
>>> On Wed, Jul 16, 2014 at 09:10:36PM +0300, Ruslan Kuprieiev wrote:
>>>> Hi Tycho,
>>>>
>>>> could you describe what do you want to do and why libcriu and RPC
>>>> don't match
>>>> your needs?
>>> I'm working on integrating criu directly into lxc, so there can be
>>> commands like lxc-checkpoint and lxc-restore. If I understand things
>>> correctly, we'll either have to run a criu daemon all the time, or
>>> spawn one when they run lxc-{checkpoint,restore}, do the checkpoint or
>>> restore, and then kill it off. It seems much cleaner to me just to
>>> have a set of library functions that we could do this with in process.
>>>
>>> I'm not necessarily opposed to the idea of using the RPC, I just
>>> figured it probably wouldn't be that hard to get at least a tiny
>>> libcriu going that would do what I needed.
>>>
>>> Tycho
>>>
>>>> Thanks,
>>>> Ruslan
>>>>
>>>> On 16.07.2014 19:37, Tycho Andersen wrote:
>>>>> Hi all,
>>>>>
>>>>> I'm interested in making an in-process version of libcriu, as opposed
>>>>> to the RPC version that currently exists today. I can tack it on to
>>>>> the existing libcriu and include the necessary symbols, or I could
>>>>> start out fresh. Which option is preferable? Also, if I start fresh,
>>>>> what should I call such a thing?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Tycho
>>>>> _______________________________________________
>>>>> CRIU mailing list
>>>>> CRIU at openvz.org
>>>>> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list