mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 03:03:40 +00:00
Improve vagrant reliablility, fix race condition with openvswitch and docker
This commit is contained in:
@@ -60,6 +60,14 @@ done
|
||||
mkdir -p /etc/salt/minion.d
|
||||
cat <<EOF >/etc/salt/minion.d/master.conf
|
||||
master: '$(echo "$MASTER_NAME" | sed -e "s/'/''/g")'
|
||||
master: '$(echo "$MASTER_NAME" | sed -e "s/'/''/g")'
|
||||
auth_timeout: 10
|
||||
auth_tries: 2
|
||||
auth_safemode: True
|
||||
ping_interval: 1
|
||||
random_reauth_delay: 3
|
||||
state_aggregrate:
|
||||
- pkg
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/salt/minion.d/grains.conf
|
||||
|
@@ -34,9 +34,26 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
||||
done
|
||||
|
||||
# Let the minion know who its master is
|
||||
# Recover the salt-minion if the salt-master network changes
|
||||
## auth_timeout - how long we want to wait for a time out
|
||||
## auth_tries - how many times we will retry before restarting salt-minion
|
||||
## auth_safemode - if our cert is rejected, we will restart salt minion
|
||||
## ping_interval - restart the minion if we cannot ping the master after 1 minute
|
||||
## random_reauth_delay - wait 0-3 seconds when reauthenticating
|
||||
## recon_default - how long to wait before reconnecting
|
||||
## recon_max - how long you will wait upper bound
|
||||
## state_aggregrate - try to do a single yum command to install all referenced packages where possible at once, should improve startup times
|
||||
##
|
||||
mkdir -p /etc/salt/minion.d
|
||||
cat <<EOF >/etc/salt/minion.d/master.conf
|
||||
master: '$(echo "$MASTER_NAME" | sed -e "s/'/''/g")'
|
||||
auth_timeout: 10
|
||||
auth_tries: 2
|
||||
auth_safemode: True
|
||||
ping_interval: 1
|
||||
random_reauth_delay: 3
|
||||
state_aggregrate:
|
||||
- pkg
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/salt/minion.d/log-level-debug.conf
|
||||
|
@@ -39,6 +39,11 @@ grep -q kbr0 /etc/sysconfig/docker || {
|
||||
# Stop docker before making these updates
|
||||
systemctl stop docker
|
||||
|
||||
# Install openvswitch
|
||||
yum install -y openvswitch
|
||||
systemctl enable openvswitch
|
||||
systemctl start openvswitch
|
||||
|
||||
# create new docker bridge
|
||||
ip link set dev ${DOCKER_BRIDGE} down || true
|
||||
brctl delbr ${DOCKER_BRIDGE} || true
|
||||
@@ -85,6 +90,7 @@ grep -q kbr0 /etc/sysconfig/docker || {
|
||||
echo "OPTIONS='-b=kbr0 --selinux-enabled ${DOCKER_OPTS}'" >/etc/sysconfig/docker
|
||||
systemctl daemon-reload
|
||||
systemctl start docker
|
||||
|
||||
}
|
||||
EOF
|
||||
|
||||
|
Reference in New Issue
Block a user