-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: add flag to view process tree #56
feat: add flag to view process tree #56
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #56 +/- ##
==========================================
- Coverage 80.56% 79.85% -0.72%
==========================================
Files 3 3
Lines 391 407 +16
==========================================
+ Hits 315 325 +10
- Misses 55 59 +4
- Partials 21 23 +2
☔ View full report in Codecov by Sentry. |
aece90d
to
e352f25
Compare
CRIU dump and restore are failing in the CI, I'm not sure why. Is it because of insufficient permissions or something? I based the workflow directly off of the one we have in go-criu. |
We run in a unprivileged container. GitHub actions supports privileged containers. Please try that. |
Looks like that helped - now both workflows fail on restore 😆 |
You either need to print the logs in an error case or log to stdout. It could be necessary to mount /lib/modules from the host into the container so that necessary module can be loaded. But without logs it is difficult to tell. |
I don't want to create too much noise on this PR. Let me try it out on a separate branch, and push the changes here once I get it working |
I think we might need to wait a bit with this PR. My favourite approach right now would be to make everything PID tree based. Maybe the table view is only useful for the quick overview. I am curious in how far the tree based approach would work for |
Personally, I think the issue with the tree view is that it will restrict the amount of information we can provide. If we put too much info in the tree, it will become unreadable, and hard to track the parent/children. I was thinking we'll use the tree for the barebones process tree (PID + process name), and use tables for more information. If we display both, then the user can have a quick glance at the tree to understand the process structure and explore the individual process info through the tables. |
625fcfd
to
48b6c18
Compare
We talked about binary sizes before. I think we should include a CI check about the binary size like Podman has. Build each PR without the PR and record the binary size, build the PR with the changes and record the binary size. Compare both sizes and fail if +10%. |
I've added the process tree logic here. I didn't want to create a separate branch and PR for it as of now since I had important changes in the first two commits, and did not want to duplicate them. If this looks good, we can discuss how file descriptors, memory maps, etc. integrate into this and add them accordingly. I still have the commit and code for the file descriptors feature saved on a different branch. |
There are a couple of things that should be done differently. This PR mixes too many things. There is some renaming going on which should be a separate commit. The changes to the testing and the new features should be different PRs. For the new feature I would like to see some example output in the PR description. Instead of the loop.c example, let's try to use Also the binary size comparison PR should be done before any more includes from go-criu. |
Got it, I'll split it up and open separate PRs. |
527b5b9
to
742e495
Compare
@adrianreber I've updated the PR description with the tree we currently display during tests (with piggie). |
Looks good for a first step. I like it. |
742e495
to
296b668
Compare
296b668
to
db5c696
Compare
db5c696
to
3c467b2
Compare
3c467b2
to
3bbee76
Compare
Using `ExcludePatterns` to unpack files prevents fine-grained control over extracting specific image file from the checkpoint directory. By iterating the archive, we can now unpack specific files from subdirectories without unpacking the entire directory. Signed-off-by: Prajwal S N <[email protected]>
The process tree in the checkpoint can now be viewed with the `--ps-tree` flag. Signed-off-by: Prajwal S N <[email protected]>
Signed-off-by: Prajwal S N <[email protected]>
3bbee76
to
4a28ac1
Compare
CRIT already allows us to explore the process tree, file descriptors, memory map, and RSS map for a checkpoint. These features can be integrated with checkpointctl to allow more info to be displayed with
checkpointctl show
. This PR introducescheckpointctl show --ps-tree
for viewing the process tree.Here's a sample output of the tree displayed for a single process: