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 log not available on failure #25154

Open
hanwen-flow opened this issue Jan 29, 2025 · 0 comments
Open

checkpoint log not available on failure #25154

hanwen-flow opened this issue Jan 29, 2025 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@hanwen-flow
Copy link

Feature request description

when checkpointing goes wrong, there is a message to inspect the dump.log file. However, the path to the file is not programmatically available, ie. in the dump below, the State field does not have CheckpointLog set.

2025/01/29 14:08:57 executing /usr/bin/sudo /home/hanwen/vc/containers/podman/bin/podman container checkpoint --compress=none --print-stats -k
2025-01-29T13:08:57.463757Z: CRIU checkpointing failed -52.  Please check CRIU logfile /var/lib/containers/storage/overlay-containers/1e0440ae9836892a528526a69b69c200130691c5443c2c05c4d432ef91e7be3d/userdata/dump.log
Error: `/usr/local/bin/crun checkpoint --image-path /var/lib/containers/storage/overlay-containers/1e0440ae9836892a528526a69b69c200130691c5443c2c05c4d432ef91e7be3d/userdata/checkpoint --work-path /var/lib/containers/storage/overlay-containers/1e0440ae9836892a528526a69b69c200130691c5443c2c05c4d432ef91e7be3d/userdata 1e0440ae9836892a528526a69b69c200130691c5443c2c05c4d432ef91e7be3d` failed: exit status 1
2025/01/29 14:08:57 executing /usr/bin/sudo /home/hanwen/vc/containers/podman/bin/podman container inspect restored-1738156132
2025/01/29 14:08:57 error snapshotting: exit status 125, log unavailable (exit status 1)
exit status 1
hanwen@hanwen-flow:~/vc/ci-experiments$ sudo podman inspect restored-1738156132
[
     {
          "Id": "1e0440ae9836892a528526a69b69c200130691c5443c2c05c4d432ef91e7be3d",
          "Created": "2025-01-29T14:08:53.166262242+01:00",
          "Path": "python3",
          "Args": [
               "-m",
               "http.server",
               "9000"
          ],
          "State": {
               "OciVersion": "1.2.0",
               "Status": "running",
               "Running": true,
               "Paused": false,
               "Restarting": false,
               "OOMKilled": false,
               "Dead": false,
               "Pid": 131166,
               "ConmonPid": 131160,
               "ExitCode": 0,
               "Error": "",
               "StartedAt": "2025-01-29T14:08:53.166262763+01:00",
               "FinishedAt": "0001-01-01T00:00:00Z",
               "Health": {
                    "Status": "",
                    "FailingStreak": 0,
                    "Log": null
               },
               "CgroupPath": "/machine.slice/libpod-1e0440ae9836892a528526a69b69c200130691c5443c2c05c4d432ef91e7be3d.scope",
               "CheckpointedAt": "0001-01-01T00:00:00Z",
               "RestoredAt": "2025-01-29T14:08:55.918890908+01:00",
               "CheckpointPath": "/var/lib/containers/storage/overlay-containers/1e0440ae9836892a528526a69b69c200130691c5443c2c05c4d432ef91e7be3d/userdata/checkpoint",
               "RestoreLog": "/var/lib/containers/storage/overlay-containers/1e0440ae9836892a528526a69b69c200130691c5443c2c05c4d432ef91e7be3d/userdata/restore.log",
               "Restored": true
          },

Suggest potential solution

my request is to set the CheckpointLog field, or even better, make the checkpoint log contents available as a return value of the checkpoint operation, eg. by inserting it into entities.CheckpointReport or provide a --log option.

Have you considered any alternatives?

alternative: the log is generated in filepath.Join(inspect.StaticDir, "dump.log")

Additional context

Add any other context or screenshots about the feature request here.

@hanwen-flow hanwen-flow added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant