Make the snapshotter configurable - review suggestions / ideas#48
Closed
thaJeztah wants to merge 9 commits intorumpl:snapshotter-configurationfrom
Closed
Make the snapshotter configurable - review suggestions / ideas#48thaJeztah wants to merge 9 commits intorumpl:snapshotter-configurationfrom
thaJeztah wants to merge 9 commits intorumpl:snapshotter-configurationfrom
Conversation
Signed-off-by: Djordje Lukic <[email protected]>
Also moved some layerStore related initialization to the non-c8d case because otherwise they get treated as a graphdriver plugins. Signed-off-by: Paweł Gronowski <[email protected]>
thaJeztah
commented
Aug 9, 2022
daemon/daemon.go
Outdated
Comment on lines
+1017
to
+1023
| imageRoot := filepath.Join(config.Root, "image", layerStore.DriverName()) | ||
| ifs, err := image.NewFSStoreBackend(filepath.Join(imageRoot, "imagedb")) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
Perhaps this should even be further down (line 1040); I wasn't 100% sure though if some of the other code depended on side-effects of this (creating the directories)
thaJeztah
commented
Aug 9, 2022
3776925 to
8ddfa5d
Compare
daemon: move image-store creation to where it's used; imageRoot should not be set _before_ the graphdriver name is set, otherwise it may be empty, and would make it use `/var/lib/docker/image` instead of `/var/lib/docker/image/<storage-driver>/` Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
- use early return - combine all cases to a single switch - don't trim io.containerd.snapshotter.v1 prefix, as containerd itself does not currently support fully-qualified plugin names either (we may consider adding support for it in future) Signed-off-by: Sebastiaan van Stijn <[email protected]>
- make sure to de-reference the whole struct - use gotest.tools - rename variables for consistency/clarity Signed-off-by: Sebastiaan van Stijn <[email protected]>
Reduce the use of daemon.graphDriver field, which should be removed. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
8ddfa5d to
a549834
Compare
thaJeztah
commented
Aug 9, 2022
daemon/daemon.go
Outdated
Comment on lines
-930
to
-931
| imageRoot := filepath.Join(config.Root, "image", d.graphDriver) | ||
|
|
f060068 to
e645f73
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
relates to #40