Skip to content

Commit

Permalink
sriov provider, run etcd in memory
Browse files Browse the repository at this point in the history
Currently we encounter bad performance of etcd on
sriov provider cluster on DinD setup.
We get 'etcdserver: timeout errors' that causes jobs to
fail often.

In such cases it is recommanded [1] to use in-memory etcd
Running etcd in memory should improve performance and
will make sriov provider more stabilized.

[1] kubernetes-sigs/kind#1922

Signed-off-by: Or Mergi <[email protected]>
  • Loading branch information
ormergi committed Nov 17, 2020
1 parent fbdbc59 commit 1195f36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cluster-up/cluster/kind-k8s-sriov-1.17.0/provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ function up() {

cp $KIND_MANIFESTS_DIR/kind.yaml ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml

export ETCD_DATA_DIR="/mnt/etcd"
ensure_memory_dir_for_etcd_data

kind_up

${KUBEVIRTCI_PATH}/cluster/$KUBEVIRT_PROVIDER/config_sriov.sh
Expand Down
12 changes: 12 additions & 0 deletions cluster-up/cluster/kind/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,19 @@ EOF
done
}

function _add_control_plane_extra_mounts() {
if [[ "$KUBEVIRT_PROVIDER" =~ sriov.* ]]; then
if [ "$ETCD_IN_MEMORY != none"]; then
cat <<EOF >> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
extraMounts:
- containerPath: /var/lib/etcd
hostPath: $ETCD_DATA_DIR
EOF
fi
}

function _prepare_kind_config() {
_add_control_plane_extra_mounts
_add_workers

echo "Final KIND config:"
Expand Down

0 comments on commit 1195f36

Please sign in to comment.