checkpoint-restore / checkpointctl

A tool for in-depth analysis of container checkpoints
Apache License 2.0
87 stars 15 forks source link

Add support for list command #54

Closed rst0git closed 3 months ago

rst0git commented 1 year ago

There are several standard locations where container engines like Podman and CRI-O store container checkpoints. However, these locations are not well documented and it might be difficult for users to find them. It would be very useful to have a command like checkpointctl list that would be able to list container checkpoints created by Podman and CRI-O.

Nitishupkr commented 1 year ago

i take up this issue

rst0git commented 1 year ago

Hi @Nitishupkr, you are more than welcome to work on this GitHub issue. Please let us know if you have any questions.

Parthiba-Hazra commented 6 months ago

@Nitishupkr you still working on this? if not then I can take on.

Parthiba-Hazra commented 6 months ago

@rst0git if I am not wrong then container engine store container checkpoints here - podman - /var/lib/containers/storage/overlay-containers CRI-O - /var/run/crio/checkpoints

for the list command are we gonna print the full path of checkpoint containers? and is there any other directories we also need to check? and what about the checkpoints that are store in the directory specified by the users during the container checkpoint command execution?

rst0git commented 6 months ago

@Parthiba-Hazra As a starting point, we can add checkpointctl list command that shows checkpoints stored in /var/lib/kubelet/checkpoints/. This path is used by Kubernetes/CRI-O and contains files with the following naming convention:

checkpoint-<pod-name>_<namespace-name>-<container-name>-<timestamp>.tar

Example:

checkpoint-counter-tl58j_default-counter-2023-10-12T11:02:56+01:00.tar

for the list command are we gonna print the full path of checkpoint containers?

It would good to use file name parsing and output a table similar to the checkpointctl show command. This functionality is particularly useful in scenarios where automated periodic checkpointing is used as a fault-tolerance mechanism, leading to many container checkpoints created in this directory.

what about the checkpoints that are store in the directory specified by the users during the container checkpoint command execution?

Once the list command has been merged, we could extend checkpointctl with support for configuration files that enable users to change the default path or to specify additional locations.

@adrianreber Do you have any thoughts?

Parthiba-Hazra commented 6 months ago

@Parthiba-Hazra As a starting point, we can add checkpointctl list command that shows checkpoints stored in /var/lib/kubelet/checkpoints/. This path is used by Kubernetes/CRI-O and contains files with the following naming convention:

checkpoint-<pod-name>_<namespace-name>-<container-name>-<timestamp>.tar

Example:

checkpoint-counter-tl58j_default-counter-2023-10-12T11:02:56+01:00.tar

for the list command are we gonna print the full path of checkpoint containers?

It would good to use file name parsing and output a table similar to the checkpointctl show command. This functionality is particularly useful in scenarios where automated periodic checkpointing is used as a fault-tolerance mechanism, leading to many container checkpoints created in this directory.

what about the checkpoints that are store in the directory specified by the users during the container checkpoint command execution?

Once the list command has been merged, we could extend checkpointctl with support for configuration files that enable users to change the default path or to specify additional locations.

@adrianreber Do you have any thoughts?

yes that sounds good.

Parthiba-Hazra commented 3 months ago

@rst0git I think this can be closed now.