From d32fd694c7424ab4ff4f98ca1799a141f8aebbc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=BE=D0=B2=D0=B0=D1=80=D0=B8=D1=89=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D0=B8=D1=81=D1=82?= <2962928213@qq.com> Date: Sun, 23 Jul 2023 22:36:41 +0800 Subject: [PATCH] fix: clearing .ssh/known_hosts in cleanup of test environment --- hack/jenkins/cron/cleanup_and_reboot_Linux.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hack/jenkins/cron/cleanup_and_reboot_Linux.sh b/hack/jenkins/cron/cleanup_and_reboot_Linux.sh index 462fd0274b..280da39577 100755 --- a/hack/jenkins/cron/cleanup_and_reboot_Linux.sh +++ b/hack/jenkins/cron/cleanup_and_reboot_Linux.sh @@ -51,6 +51,10 @@ function cleanup() { fi fi sudo killall --user "${user}" minikube >/dev/null 2>&1 || true + # clear the known_host file (~/.ssh/known_hosts) + if test -f /home/${user}/.ssh/known_hosts; then + sudo echo "" > /home/${user}/.ssh/known_hosts + fi done # clean docker left overs echo -e "\ncleanup docker..."