-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Kicbase simplify image load - remove confusing message related to podman #22024
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: obnoxxx The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @obnoxxx. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions 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. |
|
Can one of the admins verify this patch? |
pkg/minikube/node/cache.go
Outdated
| klog.Infof("successfully saved %s as a tarball", img) | ||
| } | ||
| if downloadOnly && err == nil { | ||
| if downloadOnly { |
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 we run with --download-only for downloading required resource, I think we expect to fail if the download fails. Here we ignore the download error and return success to caller.
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.
The if downloadOnly block is now within a bigger if err == nil block.
So this should be OK, right?
| return fmt.Errorf("not yet implemented, see issue #8426") | ||
| } | ||
| if driver.IsDocker(cc.Driver) && err == nil { | ||
| if driver.IsDocker(cc.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.
If the download failed, why are we loading the image from cache?
| klog.Infof("%s exists in daemon, skipping load", img) | ||
| finalImg = img | ||
| return 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.
This is simplied since we already handled downloadOnly, but this handling seems wrong, so we need to revisit this change after error handling is fixed.
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.
This is not new code. The diff just makes it look new, but it is presented this way as the convoluted if statement above is broken apart for greater clarity in the code.
fwiw, the downloadOnly case was treated here without this patch. Now it is treated further below (see line 169).
|
|
||
| if cc.Driver == driver.Podman { | ||
| return fmt.Errorf("not yet implemented, see issue #8426") | ||
| } |
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.
This is the only correct change - removing the bad fmt.Errorf. But it would be more correct to convert this to debug log like:
Skipping <operation description>: not implemented, see issue #8426
This will improve the user experience but make it easier to debug podman driver, in case skipping has negative effects. If this operation is not needed for podman removing the log is a better change, but I'm not sure what this code is doing and wha is the unimplemented operation that we skipped.
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.
good point. I will change the patch accordingly.
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.
done, fwiw.
91b215e to
45d91f0
Compare
bccc876 to
6dcfc40
Compare
|
@medyagh , @afbjorklund FYI. |
|
You can just skip the message, there is no need for such error output among the emojis? There is also no need to pull the kicbase to the cache, if it is not going to be used? |
6dcfc40 to
6097934
Compare
|
@afbjorklund wrote:
Good point. Removed.
With the patch, pulling to cache is only done for the docker driver anyways. new output with patch (also updated the description): $ make clean && make
$ ./out/minikube delete --all
🔥 Deleting "minikube" in podman ...
🔥 Removing /home/obnox/.minikube/machines/minikube ...
💀 Removed all traces of the "minikube" cluster.
🔥 Successfully deleted all profiles
$ time ./out/minikube start -d podman
😄 minikube v1.37.0 on Fedora 43
✨ Using the podman driver based on user configuration
📌 Using Podman driver with root privileges
👍 Starting "minikube" primary control-plane node in "minikube" cluster
🚜 Pulling base image v0.0.48-1764169655-21974 ...
❗ minikube cannot pull kicbase image from any docker registry, and is trying to download kicbase tarball from github release page via HTTP.
❗ It's very likely that you have an internet issue. Please ensure that you can access the internet at least via HTTP, directly or with proxy. Currently your proxy configuration is:
> kicbase-v0.0.48-amd64.tar: 1.22 GiB / 1.22 GiB 100.00% 18.34 MiB p/s 1m
🔥 Creating podman container (CPUs=2, Memory=7900MB) ...
🐳 Preparing Kubernetes v1.34.2 on Docker 29.0.4 ...
🔗 Configuring bridge CNI (Container Networking Interface) ...
🔎 Verifying Kubernetes components...
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟 Enabled addons: storage-provisioner, default-storageclass
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
real 1m42.655s
user 0m6.445s
sys 0m6.654s
$ echo $?
0
$ |
|
If you don't pull anything to the cache, then there should not be any such output either. The first line could remain, as an information. But it will be podman doing the pulling. |
6097934 to
92ddd47
Compare
|
@afbjorklund wrote:
Good points, thanks! Updated accordingly. |
minikube start -d podman issued a confusing message that image loading is unimplemented for the podman driver This change removes this message without changing anythink else in the kicbase image loading Signed-off-by: Michael Adam <[email protected]>
This change refactors beginDownloadKicBaseImage() a bit to
achieve a more streamlined flow of logic, combining
redundant blocks.
Signed-off-by: Michael Adam <[email protected]>
92ddd47 to
e700ad4
Compare
refactors image loading in
beginDownloadKicBaseImage()a bit to simplify the logicby combining redundant code blocks.
In the special case of podman, it leaves image loading from cache unimplemented unimplemented and removes the confusing and unhelpful message.
Thus is intended as a replacement for PR #21932 without pretending to implement the cache handling.
The otputs of
minikube start -d podmanare provided with and without this patch illustrate the changed behavior:without the patch
with the patch