-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
WIP: Check if storage driver is overlay2 before preload #7628
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## master #7628 +/- ##
==========================================
- Coverage 36.49% 36.44% -0.05%
==========================================
Files 147 147
Lines 9139 9150 +11
==========================================
Hits 3335 3335
- Misses 5416 5427 +11
Partials 388 388
|
@@ -91,6 +94,22 @@ func PreloadExists(k8sVersion, containerRuntime string) bool { | |||
return false | |||
} | |||
|
|||
cmd := exec.Command("docker", "info", "-f", "{{.Info.Driver}}") |
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.
lets use the oci.DaemonInfo for this (add the storage driver to it)
(we can later make that a cached call so we dont have to keep calling it)
also lets try to download the image for that driver
if that driver doesnt exist then dont preload
(we have the storage driver in the filename) so that shoudl make it easy.
so in the future if we mmake preload images for that storage driver we can suppor it
#7626 (comment)
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.
here is the link for DaemonInfo
I believe u could update the struct with the new format, so the Storage Driver be unmarshalized into it
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.
I just copied the code from the generator
https://github.com/kubernetes/minikube/blob/master/hack/preload-images/preload_images.go#L82
The current code is just to stop minikube from killing docker (the current behavior) Adding a working cache for non-overlayfs2 requires more work, and might not be doable So it was not part of this PR. Could use the so called "oci" DaemonInfo, though. |
I agree adding new storage should not be part of this PR, |
Need to make sure it is using the correct docker daemon, when determining storage driver... In this case, the |
do you mean pointing to the Docker on the user's system and not inside minikube ? if thats what you mean, we have a func "PointToHostDockerDaemon()" that we run during init do you mean the Docker inside Docker should use the same storage driver as the Host ? (if yes why ? is it there evidence it doesnt work ? ) |
It is fine if we hardcode the internal storage driver, but the external one could be anything... |
What do we need to move this PR forward? |
I got confused half-way through the implementation... I thought that we could continue with hardcoding the internal storage driver (to |
Closing until we're sure what to do with this. Please feel free to |
For #7626