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

Commit 9cdc09b

Browse files
committed
retry modprobe, and specific error (#3491)
# Conflicts: # parts/k8s/kubernetescustomscript.sh
1 parent 8f53c34 commit 9cdc09b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

parts/k8s/kubernetescustomscript.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ ERR_K8S_RUNNING_TIMEOUT=30 # Timeout waiting for k8s cluster to be healthy
2424
ERR_K8S_DOWNLOAD_TIMEOUT=31 # Timeout waiting for Kubernetes download(s)
2525
ERR_KUBECTL_NOT_FOUND=32 # kubectl client binary not found on local disk
2626
ERR_CNI_DOWNLOAD_TIMEOUT=41 # Timeout waiting for CNI download(s)
27+
ERR_MODPROBE_FAIL=49 # Unable to load a kernel module using modprobe
2728
ERR_OUTBOUND_CONN_FAIL=50 # Unable to establish outbound connection
2829
ERR_CUSTOM_SEARCH_DOMAINS_FAIL=80 # Unable to configure custom search domains
2930
ERR_APT_DAILY_TIMEOUT=98 # Timeout waiting for apt daily updates
@@ -252,7 +253,7 @@ function installCNI() {
252253
chmod -R 755 $CNI_BIN_DIR
253254
# Turn on br_netfilter (needed for the iptables rules to work on bridges)
254255
# and permanently enable it
255-
modprobe br_netfilter
256+
retrycmd_if_failure 30 6 10 modprobe br_netfilter || exit $ERR_MODPROBE_FAIL
256257
# /etc/modules-load.d is the location used by systemd to load modules
257258
echo -n "br_netfilter" > /etc/modules-load.d/br_netfilter.conf
258259
}

0 commit comments

Comments
 (0)