Merge pull request #28778 from ivan4th/support-custom-fedora-repos-in-vagrant-provider
Automatic merge from submit-queue Support custom Fedora repos in vagrant provider Sometimes `KUBERNETES_PROVIDER=vagrant cluster/kube-up.sh` fails due to problems with Fedora's metalink URL: ``` Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-23&arch=x86_64 [Connection timed out after 120002 milliseconds] ``` This PR makes it possible to specify a custom Fedora repository URL: ``` export CUSTOM_FEDORA_REPOSITORY_URL=https://download.fedoraproject.org/pub/fedora/ ``` []() <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/28778) <!-- Reviewable:end -->
This commit is contained in:
@@ -28,7 +28,14 @@ function prepare-package-manager() {
|
||||
echo "Prepare package manager"
|
||||
|
||||
# Useful if a mirror is broken or slow
|
||||
echo "fastestmirror=True" >> /etc/dnf/dnf.conf
|
||||
if [ -z "$CUSTOM_FEDORA_REPOSITORY_URL" ]; then
|
||||
echo "fastestmirror=True" >> /etc/dnf/dnf.conf
|
||||
else
|
||||
# remove trailing slash from URL if it's present
|
||||
CUSTOM_FEDORA_REPOSITORY_URL="${CUSTOM_FEDORA_REPOSITORY_URL%/}"
|
||||
sed -i -e "/^metalink=/d" /etc/yum.repos.d/*.repo
|
||||
sed -i -e "s@^#baseurl=http://download.fedoraproject.org/pub/fedora@baseurl=$CUSTOM_FEDORA_REPOSITORY_URL@" /etc/yum.repos.d/*.repo
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
@@ -187,6 +187,7 @@ function echo-kube-env() {
|
||||
echo "OPENCONTRAIL_KUBERNETES_TAG='${OPENCONTRAIL_KUBERNETES_TAG:-}'"
|
||||
echo "OPENCONTRAIL_PUBLIC_SUBNET='${OPENCONTRAIL_PUBLIC_SUBNET:-}'"
|
||||
echo "E2E_STORAGE_TEST_ENVIRONMENT='${E2E_STORAGE_TEST_ENVIRONMENT:-}'"
|
||||
echo "CUSTOM_FEDORA_REPOSITORY_URL='${CUSTOM_FEDORA_REPOSITORY_URL:-}'"
|
||||
}
|
||||
|
||||
function verify-cluster {
|
||||
|
Reference in New Issue
Block a user