You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by rm...@apache.org on 2020/02/16 18:55:17 UTC

[flink] 04/05: [hotfix] Harden kubernetes test

This is an automated email from the ASF dual-hosted git repository.

rmetzger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 0a24c89d2905673ec306e68fb72b57606133e031
Author: Robert Metzger <rm...@apache.org>
AuthorDate: Sun Feb 16 15:03:11 2020 +0100

    [hotfix] Harden kubernetes test
---
 flink-end-to-end-tests/test-scripts/common_kubernetes.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/flink-end-to-end-tests/test-scripts/common_kubernetes.sh b/flink-end-to-end-tests/test-scripts/common_kubernetes.sh
index b634e1e..bcfbb36 100755
--- a/flink-end-to-end-tests/test-scripts/common_kubernetes.sh
+++ b/flink-end-to-end-tests/test-scripts/common_kubernetes.sh
@@ -30,12 +30,14 @@ RESULT_HASH="e682ec6622b5e83f2eb614617d5ab2cf"
 function setup_kubernetes_for_linux {
     # Download kubectl, which is a requirement for using minikube.
     if ! [ -x "$(command -v kubectl)" ]; then
+        echo "Installing kubectl ..."
         local version=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
         curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$version/bin/linux/amd64/kubectl && \
             chmod +x kubectl && sudo mv kubectl /usr/local/bin/
     fi
     # Download minikube.
     if ! [ -x "$(command -v minikube)" ]; then
+        echo "Installing minikube ..."
         curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && \
             chmod +x minikube && sudo mv minikube /usr/local/bin/
     fi
@@ -48,9 +50,10 @@ function check_kubernetes_status {
 
 function start_kubernetes_if_not_running {
     if ! check_kubernetes_status; then
+        echo "Starting minikube ..."
         start_command="minikube start"
         # We need sudo permission to set vm-driver to none in linux os.
-        [[ "${OS_TYPE}" = "linux" ]] && start_command="sudo ${start_command} --vm-driver=none"
+        [[ "${OS_TYPE}" = "linux" ]] && start_command="sudo CHANGE_MINIKUBE_NONE_USER=true ${start_command} --vm-driver=none"
         ${start_command}
         # Fix the kubectl context, as it's often stale.
         minikube update-context
@@ -70,6 +73,7 @@ function start_kubernetes {
 }
 
 function stop_kubernetes {
+    echo "Stopping minikube ..."
     stop_command="minikube stop"
     [[ "${OS_TYPE}" = "linux" ]] && stop_command="sudo ${stop_command}"
     if ! retry_times ${MINIKUBE_START_RETRIES} ${MINIKUBE_START_BACKOFF} "${stop_command}"; then