Merge pull request #24245 from autostatic/master

Automatic merge from submit-queue

Added check for noexec mount of /tmp on master

Signed CLA.
This commit is contained in:
k8s-merge-robot 2016-04-20 03:49:39 -07:00
commit 035e365de7

View File

@ -121,6 +121,14 @@ function verify-prereqs() {
fi
}
# Check if /tmp is mounted noexec
function check-tmp-noexec() {
if ssh $SSH_OPTS "$MASTER" "grep '/tmp' /proc/mounts | grep -q 'noexec'" >/dev/null 2>&1; then
echo "/tmp is mounted noexec on $MASTER_IP, deploying master failed"
exit 1
fi
}
# Install handler for signal trap
function trap-add() {
local handler="$1"
@ -412,6 +420,8 @@ function provision-master() {
echo -e "\nDeploying master on machine ${MASTER_IP}"
check-tmp-noexec
ssh $SSH_OPTS "$MASTER" "mkdir -p ~/kube/default"
# copy the binaries and scripts to the ~/kube directory on the master