Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkpoint/Restore CLI #2191

Closed
rst0git opened this issue Jan 20, 2019 · 8 comments

Comments

Projects
None yet
5 participants
@rst0git
Copy link

commented Jan 20, 2019

The current Docker CLI for creating a checkpoint is:

$ docker checkpoint --help

Usage:	docker checkpoint COMMAND

Commands:
  create      Create a checkpoint from a running container
  ls          List checkpoints for a container
  rm          Remove a checkpoint
$ docker checkpoint create --help

Usage:	docker checkpoint create [OPTIONS] CONTAINER CHECKPOINT

Options:
      --checkpoint-dir string   Use a custom checkpoint storage directory
      --help                    Print usage
      --leave-running           Leave the container running after checkpoint

and the CLI of podman is:

$ sudo podman container checkpoint --help

USAGE:
   podman container checkpoint [command options] CONTAINER-NAME [CONTAINER-NAME ...]

OPTIONS:
   --all, -a            checkpoint all running containers
   --keep, -k           keep all temporary checkpoint files
   --latest, -l         act on the latest container podman is aware of
   --leave-running, -R  leave the container running after writing checkpoint to disk
   --tcp-established    checkpoint a container with established TCP connections

Some differences are:

  • podman container checkpoint / docker checkpoint create
  • unique checkpoint name
  • create, rm and ls
  • ability to specify --checkpoint-dir.

Would it be possible to redesign the CLI of podman to be compatible with the CLI of Docker?

@rst0git

This comment has been minimized.

Copy link
Author

commented Jan 20, 2019

@adrianreber

This comment has been minimized.

Copy link
Collaborator

commented Jan 20, 2019

Initially my implementation was closer to what docker provides, but as the docker support has never left the experimental state, I do not think it is really important to provide the same interface. I am not really opinionated here. Whatever people think works better.

@rst0git

This comment has been minimized.

Copy link
Author

commented Jan 21, 2019

It is true that Docker's checkpoint/restore functionality is still experimental (and it takes a long time for a PR to be merged in moby/docker-ce). I started the discussion because I thought that the ability to have a name associated with a checkpoint is useful, for example, when we want to periodically checkpoint a running container. However, podman also has the idea of alias docker=podman, therefore it might make sense to use similar CLI.

@rhatdan

This comment has been minimized.

Copy link
Member

commented Jan 21, 2019

It would be simple enough to add the podman checkpoint, but I will leave this up to @adrianreber

@edsantiago

This comment has been minimized.

Copy link
Collaborator

commented Feb 26, 2019

Inconsistency alert: as mentioned above, there is no podman checkpoint command. However: (1) there is a podman restore command (as well as podman container restore); and (2) the example messages for podman container checkpoint are all written as podman checkpoint. (The examples for podman container restore are written as such, but the synopsis string is just podman restore). Also: there are no man pages for podman-checkpoint nor podman-restore (both are documented as podman-container-xxxx).

I'm not going to weigh in on whether or not _checkpointCommand should be added to rootCommands, or _restoreCommand removed; but whoever decides the correct course of action, could you please see to these inconsistencies? TIA.

@rhatdan

This comment has been minimized.

Copy link
Member

commented Feb 26, 2019

Yes we need to fix this. These commands should only be available unde podman containers not as main line commands.

@adrianreber

This comment has been minimized.

Copy link
Collaborator

commented Feb 27, 2019

I have opened #2460 to remove 'restore' as a command from 'podman'. It should now only be available as 'podman container checkpoint' and 'podman container restore'.

@adrianreber

This comment has been minimized.

Copy link
Collaborator

commented Feb 27, 2019

@rst0git I am closing this for now. I think Podman's checkpoint/restore support is already better integrated and tested. As Docker's support was always hidden behind experimental I think it is not well known and not really necessary for Podman to support in the same way.

The possibility to have multiple checkpoints of one container sounds interesting and might be a good idea to implement in the future.

@edsantiago The inconsistency you reported has been resolved in #2460.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.