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

Remove losetup workaround in minikube VM #1840

Merged
merged 1 commit into from
Apr 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions scripts/minikube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,6 @@ function disable_storage_addons() {
${minikube} addons disable storage-provisioner 2>/dev/null || true
}

# minikube has the Busybox losetup, and that does not work with raw-block PVCs.
Copy link
Collaborator

Choose a reason for hiding this comment

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

removing this one will cause any issue for the one who is using an older minikube version?

# Copy the host losetup executable and hope it works.
#
# See https://github.com/kubernetes/minikube/issues/8284
function minikube_losetup() {
# scp should not ask for any confirmation
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i "$(${minikube} ssh-key)" /sbin/losetup docker@"$(${minikube} ip)":losetup
# replace /sbin/losetup symlink with the executable
${minikube} ssh 'sudo sh -c "rm -f /sbin/losetup && cp ~docker/losetup /sbin"'
}

function minikube_supports_psp() {
local MINIKUBE_MAJOR
local MINIKUBE_MINOR
Expand Down Expand Up @@ -234,7 +223,6 @@ up)
wait_for_ssh
# shellcheck disable=SC2086
${minikube} ssh "sudo mkdir -p /mnt/${DISK}/var/lib/rook;sudo ln -s /mnt/${DISK}/var/lib/rook /var/lib/rook"
minikube_losetup
fi
${minikube} kubectl -- cluster-info
;;
Expand Down