Skip to content

Add methods in sandbox and endpoint to support container checkpoint and restore #524

Closed
@huikang

Description

@huikang

This proposal is to explore adding libnetwork API to handle network connectivity during container checkpoint and restore. In general, there are two approaches.

  • CRIU-based

    This approach relies on CRIU to restore the veth pair for the Linux namespace and attach to the docker bridge. An example implemeantion can be found in Allow restore network to have network connectivity boucher/docker#17

    This implementation requires libnetwork exposing the detailed interface information to the client (i.e., docker). Specifically, docker needs to passes (1) the interface name in the container namespcae (e.g., eth0), (2) the other end of the veth pair in the host (e.g., vethxxxxxxx), (3)the network name that includes the endpoint (e.g., docker0).

    Therefore, the criu-based approach requires new APIs from the endpoint and sandbox of libnetwork to expose the above interface and bridge information.

  • libnetwork-based

    The second approach relies on libnetwork to create a new set of endpoint and sandbox for restoring the checkpointed container. However, this approach may requires modifications to the CRIU. This is because when criu restores the container process, CRIU creates the other end of the pair in the net namespace you launch criu from [1]. This veth end in the host is not known by libnetwork. Therefore, we may need to add some post-processing after criu restore the container. These post-processing should be libnetwork API calls.

[1] http://criu.org/Advanced_usage


Deprecated

Placeholder for designing new methods to support checkpoint and restore.

Considering adding the following methods

type Network interface {
    CheckpointEndpoint( )
}

type Controller interface {
    CheckpointSandbox()
}

These two methods will collaboratively reserve the endpoint (e.g., veth name) and the network namespace for the container when it is being checkpointed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions