Update ctr image inspect to show erofs filesystem#12772
Update ctr image inspect to show erofs filesystem#12772dmcgowan wants to merge 3 commits intocontainerd:mainfrom
Conversation
Add EROFS conversion support to ctr convert command with configurable options for tar-index mode and mkfs parameters. Usage: ctr image convert --erofs src:tag dst:tag ctr image convert --erofs --erofs-compression='lz4hc,12' src:tag dst:tag Signed-off-by: ChengyuZhu6 <[email protected]>
Signed-off-by: Derek McGowan <[email protected]>
2e61948 to
6c9acd4
Compare
Signed-off-by: Derek McGowan <[email protected]>
6c9acd4 to
56c6105
Compare
| } else if strings.HasPrefix(desc.MediaType, images.MediaTypeErofsLayer) { | ||
| fmt.Fprintf(p.w, "%s┌──────EROFS Layer──────\n", prefix) | ||
|
|
||
| f, err := store.ReaderAt(ctx, desc) |
There was a problem hiding this comment.
Missing f.Close() for the ReaderAt — will leak FDs.
|
|
||
| // but if root itself is a symbolic link, its target will be walked. | ||
| // func WalkDir(fsys FS, root string, fn WalkDirFunc) error { | ||
| func PrintDirectory(f io.Writer, fsys fs.FS, dir string, prefix string) { |
There was a problem hiding this comment.
For layers with many files, verbose output could get pretty long. Maybe worth adding a depth limit or file count cap?
There was a problem hiding this comment.
Yeah, I was thinking that as well or summing up the size even. Just wanted to start out simple to see if this is something useful. I know it's helpful for me but I also just want a sanity check and more rarely would want to check a specific file. In that specific file case, probably want size and perms too
|
Thanks for this 👍👍 I have to prioritize go-erofs now 😅 |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
This PR is stale because it has been open 90 days with no activity. This PR will be closed in 7 days unless new comments are made or the stale label is removed. |
|
maybe rebase it as well... it should be a simple change after go-erofs is landed.. |
Useful for testing #12555
Uncut output https://gist.github.com/dmcgowan/4017ca98baa9fdc2c7177f961769fbd9