Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

Commit c94656a

Browse files
committed
Fix the problem that the node is not ready after restart
Signed-off-by: Zhizhen Tang <zhizhen.tang@intel.com>
1 parent a34856c commit c94656a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

script/Kubernetes_setup_master.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ proxy_https=$https_proxy
4545
export http_proxy=$proxy_http
4646
export https_proxy=$proxy_https
4747

48+
if [[ -z `grep "swapoff -a" "${HOME}/.bashrc"` ]]; then
49+
echo "swapoff -a" >> "${HOME}/.bashrc"
50+
fi
51+
4852
try_command swapoff -a
4953

5054
try_command lsb_release -si > /dev/null

script/Kubernetes_setup_node.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ fi
4040

4141
# Install packages
4242
# Set Proxy if need
43+
if [[ -z `grep "swapoff -a" "${HOME}/.bashrc"` ]]; then
44+
echo "swapoff -a" >> "${HOME}/.bashrc"
45+
fi
46+
4347
try_command swapoff -a
4448

4549
try_command lsb_release -si > /dev/null

0 commit comments

Comments
 (0)