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

Added check for noexec mount of /tmp on master #24245

Merged
merged 1 commit into from
Apr 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions cluster/ubuntu/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down