Revert "Merge pull request #35821 from vishh/gci-mounter-scope"

This reverts commit 973fa6b334, reversing
changes made to 41b5fe86b6.
This commit is contained in:
saadali
2016-11-03 20:23:25 -07:00
parent b4e84d3e3b
commit 402116aed4
22 changed files with 3296 additions and 3233 deletions

View File

@@ -473,7 +473,6 @@ function start-kubelet {
flags+=" --cluster-dns=${DNS_SERVER_IP}"
flags+=" --cluster-domain=${DNS_DOMAIN}"
flags+=" --config=/etc/kubernetes/manifests"
flags+=" --experimental-mounter-path=${KUBE_HOME}/bin/mounter"
if [[ -n "${KUBELET_PORT:-}" ]]; then
flags+=" --port=${KUBELET_PORT}"
@@ -1169,15 +1168,9 @@ EOF
}
function override-kubectl {
echo "overriding kubectl"
echo "export PATH=${KUBE_HOME}/bin:\$PATH" > /etc/profile.d/kube_env.sh
}
function pre-warm-mounter {
echo "prewarming mounter"
${KUBE_HOME}/bin/mounter &> /dev/null
}
########### Main Function ###########
echo "Start to configure instance for kubernetes"
@@ -1212,8 +1205,6 @@ else
fi
override-kubectl
# Run the containerized mounter once to pre-cache the container image.
pre-warm-mounter
assemble-docker-flags
load-docker-images
start-kubelet

View File

@@ -23,25 +23,14 @@ MOUNTER_USER=root
RKT_BINARY=/home/kubernetes/bin/rkt
function gc {
# Attempt to garbage collect rkt pods with 5 retries.
# Rkt pods end up creating new copies of mounts on the host. Hence it is ideal to clean them up right away.
attempt=0
until [ $attempt -ge 5 ]; do
${RKT_BINARY} gc --grace-period=0s && break
attempt=$[$attempt+1]
sleep 1
done
${RKT_BINARY} gc --grace-period=0s &> /dev/null
}
# Garbage collect old rkt containers on exit
trap gc EXIT
echo "Running mount using a rkt fly container"
${RKT_BINARY} run --stage1-name="coreos.com/rkt/stage1-fly:1.18.0" \
--insecure-options=image \
--volume=kubelet,kind=host,source=/var/lib/kubelet,readOnly=false,recursive=true \
--mount volume=kubelet,target=/var/lib/kubelet \
--volume=rootfs,kind=host,source=/,readOnly=false,recursive=true \
--mount volume=rootfs,target=/media/root \
docker://${MOUNTER_DOCKER_IMAGE}:${MOUNTER_DOCKER_VERSION} --user=${MOUNTER_USER} --exec /bin/mount -- "$@"
echo "Successfully ran mount using a rkt fly container"