-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
amend linux cleanup script with full minikube, docker and kvm cleanup #9726
Conversation
Hi @prezha. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: prezha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Can one of the admins verify this patch? |
/ok-to-test |
@@ -36,11 +36,83 @@ logger "cleanup_and_reboot is happening!" | |||
# kill jenkins to avoid an incoming request | |||
killall java | |||
|
|||
# clean minikube left overs | |||
echo -e "\ncleanup minikube..." | |||
for user in $(lslogins --user-accs --noheadings --output=USER); do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can assume only jenkins and root (for the none driver) as users here here instead of using the for loop across all users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i've hardcoded only jenkins and root user as targets for the cleanup
kvm2 Driver |
kvm2 Driver Times for Minikube (PR 9726): 67.3s 67.7s 68.5s Averages Time Per Log
docker Driver Times for Minikube (PR 9726): 30.2s 30.9s 29.2s Averages Time Per Log
|
Any change that results in not needing to restart our jenkins machines is a welcome one to me. |
fixes: #9666
this pr adds kvm leftovers cleanup to
hack/jenkins/cron/cleanup_and_reboot_Linux.sh
- specifically: kvm domains, pools, networks (except 'default'), and finally host's kvm-related network interfacesnote
with all such "thorough" (more details below) hourly minikube/kvm/docker cleanups, we probably don't need also to reboot the host every hour (and jenkins being unavailable until the host is operable again) as we do now:
minikube/hack/jenkins/linux_integration_tests_kvm.sh
Line 37 in f2e88b4
minikube/hack/jenkins/cron/cleanup_and_reboot_Linux.sh
Line 54 in f2e88b4
and so, instead of hourly, a dayily or even a weekly
update + reboot
would probably be ok (effectively extracting that to a separate cron job) - these are just thoughts/proposal, i haven't made these changes hereas after kvm cleanup any existing minikube cluster would become unusable, i've also added full minikube (for each user account) cleanup before kvm, and then again, we could only benefit from the full docker cleanup, so i've amended that one as well
ie, on our jenkins test servers, we are currently using (partial) docker cleanup:
minikube/hack/jenkins/cron/cleanup_and_reboot_Linux.sh
Lines 39 to 43 in 9b96485
minikube/hack/jenkins/cron/cleanup_and_reboot_Darwin.sh
Lines 44 to 48 in 9b96485
minikube/hack/jenkins/common.sh
Lines 42 to 44 in 9b96485
minikube/hack/jenkins/minikube_cross_build_and_upload.sh
Lines 40 to 41 in 9b96485
minikube/hack/jenkins/linux_integration_tests_docker.sh
Lines 35 to 36 in 9b96485
minikube/hack/jenkins/linux_integration_tests_none.sh
Lines 40 to 41 in 9b96485
here i've amended
hack/jenkins/cron/cleanup_and_reboot_Linux.sh
to use:this would kill all running containers and then remove:
example output: