-
Notifications
You must be signed in to change notification settings - Fork 104
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
support nydus image topmost layer view #447
Conversation
e12eef3
to
924d064
Compare
Fantastic! This PR is useful for mounting a nydus image into a directory with if context.Bool("rw") {
mounts, err = s.Prepare(ctx, target, chainID)
} else {
mounts, err = s.View(ctx, target, chainID)
} Here is a comparison with stargz: mkdir mkdir test.bootstrap.stargz
nerdctl --snapshotter stargz pull ghcr.io/stargz-containers/alpine:3.15.3-esgz
ctr --debug i mount --rw --snapshotter stargz ghcr.io/stargz-containers/alpine:3.15.3-esgz test.bootstrap.stargz
ls test.bootstrap.stargz Output:
Unfortunately this does not work for nydus: mkdir test.bootstrap.nydus
nerdctl --snapshotter nydus pull sctb512/golang:nydusv6
ctr --debug i mount --rw --snapshotter nydus docker.io/sctb512/golang:nydusv6 test.bootstrap.nydus
ls test.bootstrap.nydus Output: None |
snapshot/snapshot.go
Outdated
if isNydusMetaLayer(pInfo.Labels) { | ||
// Nydusd might not be running. We should run nydusd to reflect the rootfs. | ||
err = o.fs.WaitUntilReady(pID) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if err := o.fs.WaitUntilReady(pID); err != nil {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
924d064
to
17036c7
Compare
|
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #447 +/- ##
=======================================
Coverage 37.15% 37.15%
=======================================
Files 60 60
Lines 6909 6909
=======================================
Hits 2567 2567
Misses 4045 4045
Partials 297 297 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
17036c7
to
7391ad3
Compare
Without inline layer fs meta blob, we can still support the topmost View for nydus image. It is useful for Buildkit to use nydus image as the base image. Signed-off-by: Changwei Ge <[email protected]>
clients like ctr is using Prepare to generate a active snapshot when mounting an image to host. But containerd is only only writing contents to the active snapshot. Signed-off-by: Changwei Ge <[email protected]>
7391ad3
to
1db810a
Compare
Without inline layer fs meta blob, we can still support the topmost View for nydus image. It is useful for Buildkit to use nydus image as the base image.
Next PR will implement View on any layer of the nydus image.