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 the swap partition from minikube.iso #3927

Merged
merged 3 commits into from
Mar 21, 2019
Merged
Show file tree
Hide file tree
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
24 changes: 0 additions & 24 deletions deploy/iso/minikube-iso/package/automount/minikube-automount
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,8 @@ if [ ! -n "$BOOT2DOCKER_DATA" ]; then
dd if=$UNPARTITIONED_HD of=/userdata.tar bs=1 count=4096 2>/dev/null
# Create the partition, format it and then mount it
echo "NEW boot2docker managed disk image ($UNPARTITIONED_HD): formatting it for use"

# Add a swap partition (so Docker doesn't complain about it missing)
(echo n; echo p; echo 2; echo ; echo +1000M ; echo w) | fdisk $UNPARTITIONED_HD
# Let kernel re-read partition table
partprobe
(echo t; echo 82; echo w) | fdisk $UNPARTITIONED_HD
# Let kernel re-read partition table
partprobe
# wait for the partition to actually exist, timeout after about 5 seconds
timer=0
while [ "$timer" -lt 10 ]; do
if [ -b "${UNPARTITIONED_HD}2" ]; then
mkswap "${UNPARTITIONED_HD}2" && break
fi
echo "Waiting for ${UNPARTITIONED_HD}2 to exist."
timer=$((timer + 1))
sleep 0.5
done

# Add the data partition
(echo n; echo p; echo 1; echo ; echo ; echo w) | fdisk $UNPARTITIONED_HD
# Let kernel re-read partition table
Expand Down Expand Up @@ -74,12 +57,6 @@ if [ ! -n "$BOOT2DOCKER_DATA" ]; then
if [ $NON_NUL == 0 ]; then
# Create the partition, format it and then mount it
echo "NEW VMware boot2docker managed disk image ($UNPARTITIONED_HD): formatting it for use"

# Add a swap partition (so Docker doesn't complain about it missing)
(echo n; echo p; echo 2; echo ; echo +1000M ; echo w) | fdisk $UNPARTITIONED_HD
(echo t; echo 82) | fdisk $UNPARTITIONED_HD
mkswap "${UNPARTITIONED_HD}2"
# Add the data partition
(echo n; echo p; echo 1; echo ; echo ; echo w) | fdisk $UNPARTITIONED_HD
BOOT2DOCKER_DATA=`echo "${UNPARTITIONED_HD}1"`
mkfs.ext4 -i 2048 -L $LABEL $BOOT2DOCKER_DATA
Expand Down Expand Up @@ -194,7 +171,6 @@ if [ -n "$BOOT2DOCKER_DATA" ]; then
mkdir -p /var/run/minikube
echo "PERSISTENT_DIR=\"/mnt/$PARTNAME\"" > /var/run/minikube/env
fi
swapon "${UNPARTITIONED_HD}2"

# /etc dirs are initialised from /usr/local, to allow the user/admin to customise
mkdir -p /var/lib/boot2docker/etc/
Expand Down
3 changes: 1 addition & 2 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ var SkipPreflights = []string{
"FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml",
"FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml",
"FileAvailable--etc-kubernetes-manifests-etcd.yaml",
// We use --ignore-preflight-errors=Swap since minikube.iso allocates a swap partition.
// (it should probably stop doing this, though...)
// So that "none" driver users don't have to reconfigure their machine
"Swap",
// We use --ignore-preflight-errors=CRI since /var/run/dockershim.sock is not present.
// (because we start kubelet with an invalid config)
Expand Down