-
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
Minikube "start" fails when using the "--cache-images" option #3250
Comments
This seems to be due to the code not mapping the Windows drive letter correctly and is somehow related to the case of it; specifically when a lowercase drive letter is used in one of the env variables that is when the problem occurs. I recall coming across this problem a little while ago while testing the caching changes. Looking at the code it seems like HOME, USERPROFILE and MINIKUBE_HOME as used to determine the path for the cache but I'm unclear on the exact logic. Having tried some experiments with different setting for those env variables I don't have a totally clear answer on the cause but the results were:
I1013 16:10:06.190145 16096 ssh_runner.go:57] Run: sudo rm -f /etc/docker/ca.pem So, in summary, I'm not quite sure what is going on yet but it seems to be due to the drive to volume mapping and I suspect strongly that it is influenced by one of the env variables having a lowercase drive letter. I will endeavour to figure it out but it is a painful process as the mk VM takes ages to boot when using VirtualBox and I've no idea why that is. |
It appears that the problem related to lowercase drive letters is caused by this piece of code in cache_images.go as it does not recognise drive letters in lower case. This should be a simple change of adding the set of lowercase lettersto the current set of uppercase ones.
** If the drive letters in the env are changed to uppercase then all of the images - bar one - download ** The image which then fails in downloading is the the storage provisioner. This is because this image is in a dir with two levels while other are just in a single level dir i.e. ...\cache\images\gcr.io\k8s-minikube vs ...\cache\images\k8s.gcr.io. This means that the code in replaceWinDriveLetterToVolumeName() which stats the dir fails - it works fine for images which are not in nested dirs.
** If the dir is manually created then all the images are downloaded correctly and the cluster starts up fine **. Since the full image cache dir structure is created in CacheImage after the path is calculated the fix would seem to be to simply remove the check in replaceWinDriveLetterToVolumeName. From CacheImage:
I shall make the relevant changes and test once I've got a build env setup sometime later this week. |
I've now made the changes and raised a PR for them. |
Can anyone confirm whether or not --cache-images now works on Windows? |
PS C:\Users\Administrator> minikube.exe start --registry-mirror=https://h35mk3lp.mirror.aliyuncs.com --vm-driver="hyperv" --memory=4096 --hyperv-virtual-switch="MinikubeSwitch"
|
BUG REPORT
Environment Windows 10
Minikube version 0.30.0
OS NA
VM Driver VirtualBox
ISO version 0.30.0
What happened: Running "minikube start" with the "--cache-images" option hangs as it appears that image caching fails to complete.
Waiting for image caching to complete...
Moving files into cluster...
.......... hangs at this point
How to reproduce it (as minimally and precisely as possible):
"minikube start --cache-images"
Output of
minikube logs
(if applicable):Adding the "-v 10" option to the start command results in the following error being displayed:
Waiting for image caching to complete...
E1013 14:36:00.778091 18324 start.go:247] Error caching images: Caching images for kubeadm: caching images: caching image C:\Users\Mark.minikube\cache\images\k8s.gcr.io\pause-amd64_3.1: getting destination path: parsing docker archive dst ref: replace a Win drive letter to a volume name: CreateFile \?\Volume{806aa746-d64c-11e5-acef-806e6f6e6963}\Users\Mark.minikube\cache\images\k8s.gcr.io: The system cannot find the path specified.
Moving files into cluster...
Anything else do we need to know:
The text was updated successfully, but these errors were encountered: