Giter Club home page Giter Club logo

Comments (7)

behouba avatar behouba commented on July 24, 2024 1

Hi @rst0git,
I would like to work on this. Do you have any suggestions on how the output should look when we handle multiple files along with arguments, such as --print-status and/or --mounts? .

I am thinking of something like this:

checkpointctl show /var/lib/kubelet/checkpoints/*.tar --mounts

Displaying container checkpoint data from /var/lib/kubelet/checkpoints/archive1.tar

+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+
|   CONTAINER    |             IMAGE              |      ID      | RUNTIME |          CREATED          | ENGINE | CHKPT SIZE | ROOT FS DIFF SIZE |
+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+
| gallant_austin | docker.io/library/nginx:latest | 5e61a1e0a308 | crun    | 2023-03-01T15:11:55+03:00 | Podman | 16.6 MiB   | 4.5 KiB           |
+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+

Overview of Mounts
+--------------------+--------+---------------------------+
|    DESTINATION     |  TYPE  |          SOURCE           |
+--------------------+--------+---------------------------+
| /proc              | proc   | proc                      |
| /dev               | tmpfs  | tmpfs                     |
| /sys               | sysfs  | sysfs                     |
| /dev/pts           | devpts | devpts                    |
| /dev/mqueue        | mqueue | mqueue                    |
| /run/secrets       | bind   | ../run/secrets            |
| /etc/hostname      | bind   | ../userdata/hostname      |
| /etc/resolv.conf   | bind   | ../userdata/resolv.conf   |
| /etc/hosts         | bind   | ../userdata/hosts         |
| /dev/shm           | bind   | ../userdata/shm           |
| /run/.containerenv | bind   | ../userdata/.containerenv |
| /sys/fs/cgroup     | cgroup | cgroup                    |
+--------------------+--------+---------------------------+

Displaying container checkpoint data from /var/lib/kubelet/checkpoints/archive2.tar

+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+
|   CONTAINER    |             IMAGE              |      ID      | RUNTIME |          CREATED          | ENGINE | CHKPT SIZE | ROOT FS DIFF SIZE |
+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+
| gallant_austin | docker.io/library/nginx:latest | 5e61a1e0a308 | crun    | 2023-03-01T15:11:55+03:00 | Podman | 16.6 MiB   | 4.5 KiB           |
+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+

Overview of Mounts
+--------------------+--------+---------------------------+
|    DESTINATION     |  TYPE  |          SOURCE           |
+--------------------+--------+---------------------------+
| /proc              | proc   | proc                      |
| /dev               | tmpfs  | tmpfs                     |
| /sys               | sysfs  | sysfs                     |
| /dev/pts           | devpts | devpts                    |
| /dev/mqueue        | mqueue | mqueue                    |
| /run/secrets       | bind   | ../run/secrets            |
| /etc/hostname      | bind   | ../userdata/hostname      |
| /etc/resolv.conf   | bind   | ../userdata/resolv.conf   |
| /etc/hosts         | bind   | ../userdata/hosts         |
| /dev/shm           | bind   | ../userdata/shm           |
| /run/.containerenv | bind   | ../userdata/.containerenv |
| /sys/fs/cgroup     | cgroup | cgroup                    |
+--------------------+--------+---------------------------+

Displaying container checkpoint data from /var/lib/kubelet/checkpoints/archive3.tar

+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+
|   CONTAINER    |             IMAGE              |      ID      | RUNTIME |          CREATED          | ENGINE | CHKPT SIZE | ROOT FS DIFF SIZE |
+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+
| gallant_austin | docker.io/library/nginx:latest | 5e61a1e0a308 | crun    | 2023-03-01T15:11:55+03:00 | Podman | 16.6 MiB   | 4.5 KiB           |
+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+

Overview of Mounts
+--------------------+--------+---------------------------+
|    DESTINATION     |  TYPE  |          SOURCE           |
+--------------------+--------+---------------------------+
| /proc              | proc   | proc                      |
| /dev               | tmpfs  | tmpfs                     |
| /sys               | sysfs  | sysfs                     |
| /dev/pts           | devpts | devpts                    |
| /dev/mqueue        | mqueue | mqueue                    |
| /run/secrets       | bind   | ../run/secrets            |
| /etc/hostname      | bind   | ../userdata/hostname      |
| /etc/resolv.conf   | bind   | ../userdata/resolv.conf   |
| /etc/hosts         | bind   | ../userdata/hosts         |
| /dev/shm           | bind   | ../userdata/shm           |
| /run/.containerenv | bind   | ../userdata/.containerenv |
| /sys/fs/cgroup     | cgroup | cgroup                    |
+--------------------+--------+---------------------------+

from checkpointctl.

rst0git avatar rst0git commented on July 24, 2024 1

It sounds like a good idea.

@adrianreber What do you think?

from checkpointctl.

adrianreber avatar adrianreber commented on July 24, 2024 1

It sounds like a good idea.

@adrianreber What do you think?

Sounds good.

The more important thing from my point of view would be to focus on unpacking only the needed files. Multiple checkpoints can be something for later.

For multiple checkpoints I would at first say to not support the additional flags. Maybe just list all the checkpoints in a single table.

from checkpointctl.

rst0git avatar rst0git commented on July 24, 2024 1

I still think I would start with a simple show all checkpoints in one table. My use case would be to get a quick overview of all checkpoints.

I also agree, using one table with an overview of all checkpoints would be more appropriate.

Example:

+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+
|   CONTAINER    |             IMAGE              |      ID      | RUNTIME |          CREATED          | ENGINE | CHKPT SIZE | ROOT FS DIFF SIZE |
+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+
| gallant_austin | docker.io/library/nginx:latest | 5e61a1e0a308 | crun    | 2023-03-01T15:11:55+03:00 | Podman | 16.6 MiB   | 4.5 KiB           |
+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+
| gallant_austin | docker.io/library/nginx:latest | 5e61a1e0a308 | crun    | 2023-03-01T15:11:55+03:00 | Podman | 16.6 MiB   | 4.5 KiB           |
+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+
| gallant_austin | docker.io/library/nginx:latest | 5e61a1e0a308 | crun    | 2023-03-01T15:11:55+03:00 | Podman | 16.6 MiB   | 4.5 KiB           |
+----------------+--------------------------------+--------------+---------+---------------------------+--------+------------+-------------------+

from checkpointctl.

behouba avatar behouba commented on July 24, 2024

Thank you, @adrianreber, for your feedback. I will also start thinking about #51.

from checkpointctl.

adrianreber avatar adrianreber commented on July 24, 2024

Thank you, @adrianreber, for your feedback. I will also start thinking about #51.

Ah, sorry. I got confused. I thought this was #51. Then my comment does not make so much sense.

I still think I would start with a simple show all checkpoints in one table. My use case would be to get a quick overview of all checkpoints.

Details are not so important in that case at first.

from checkpointctl.

behouba avatar behouba commented on July 24, 2024

Alright, I agree that it would be better to initially not support additional flags when handling multiple files.
What do you think, @rst0git?

from checkpointctl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.