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

bump up containerd (v1.0.0-beta.3) #155

Merged
merged 1 commit into from Nov 13, 2017

Conversation

AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Nov 6, 2017

Close #141
Signed-off-by: Akihiro Suda suda.akihiro@lab.ntt.co.jp

@tonistiigi
Copy link
Member

@AkihiroSuda Not sure if this is the cause for the error but this version should require root labels or leases so that created snapshots don't get garbage collected.

@AkihiroSuda AkihiroSuda changed the title [WIP, DNM] bump up containerd (2017-11-06) bump up containerd (2017-11-06) Nov 7, 2017
@AkihiroSuda AkihiroSuda force-pushed the containerd-20171106 branch 2 times, most recently from bd5ff58 to 4930a1e Compare November 7, 2017 05:42
@AkihiroSuda
Copy link
Member Author

yes, snapshots were garbage collected. updated PR.

@AkihiroSuda AkihiroSuda force-pushed the containerd-20171106 branch 2 times, most recently from a78ae37 to 99b3e28 Compare November 7, 2017 07:40
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐮

var chain []digest.Digest
for _, layer := range layers {
labels := map[string]string{
"containerd.io/gc.root": time.Now().UTC().Format(time.RFC3339),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these timestamps be time.RFC3339Nano?

@@ -31,8 +31,8 @@ import (
type pullDeps struct {
Snapshotter ctdsnapshot.Snapshotter
ContentStore content.Store
Applier rootfs.Applier
Differ rootfs.MountDiffer
Applier diff.Differ
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢 I liked the small interfaces. I guess it doesn't make sense to keep them different in buildkit anymore as well then. (Can be follow-up).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmcgowan WDYT about splitting Applier from Differ again?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there many places we need both interfaces together? We can split and have a combined interface as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmcgowan This is the place that creates all the dependencies that are sent to other objects, so nothing actually uses them in here. But, for example, before the pull component only depended on the apply function and image exporter only on the differ. Now there is no separation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -35,7 +36,7 @@ type SourceOpt struct {
SessionManager *session.Manager
Snapshotter snapshot.Snapshotter
ContentStore content.Store
Applier rootfs.Applier
Applier diff.Differ
Copy link
Member

@tonistiigi tonistiigi Nov 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This naming seems quite weird now. Although, for the pull this is definitely more understandable as applier, not differ.

var chain []digest.Digest
for _, layer := range layers {
labels := map[string]string{
"containerd.io/gc.root": time.Now().UTC().Format(time.RFC3339),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think leases containerd/containerd#1690 may be more useful in here. We can have a lease per snapshot and if it has a matching blob put it under the same lease. Then on deletion we can just remove the lease and don't need to track them separately. Also, I think these labels need to be set up in the imageexporter - then the image should become the second root. I'm fine with merging this now and use a tracking issue/follow-up PR to discuss these cases.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also if I understand this correctly, currently the manifests would remain roots and that would make the cleanup tricky as buildkit actually doesn't care about the manifests much. The content blobs should remain under a lease with snapshot and if these blobs are part of the exported image, the regular chain of image to blobs (gc.ref.content. labels) is set up.

c := &containers.Container{
ID: id,
}
_, ok := namespaces.Namespace(ctx)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment about why this is needed? Possibly something that may need further discussion in containerd repo. Very confusing why a GenerateSpec() function requires a container and client parameter.

@tonistiigi
Copy link
Member

@AkihiroSuda Can you add the comment and make the change @stevvooe requested so we can merge this. We can leave the leases change to follow-up and #157 is already fixing the missing roots on the exporter.

@AkihiroSuda
Copy link
Member Author

will update today, sorry for the delay

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
@AkihiroSuda AkihiroSuda changed the title bump up containerd (2017-11-06) bump up containerd (v1.0.0-beta.3) Nov 13, 2017
@AkihiroSuda
Copy link
Member Author

updated

Copy link
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tonistiigi tonistiigi merged commit f8c0ab0 into moby:master Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants