mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
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:
commit
035e365de7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user