Skip to content
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

jenkins: Resilient VirtualBox VM and test directory cleanup #5584

Merged
merged 4 commits into from
Oct 10, 2019

Conversation

tstromberg
Copy link
Contributor

  • Make sure that "list vms" regex only matches guid portion
  • Add logging
  • unregistervm still called if startvm fails

Related: #5583

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 9, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tstromberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 9, 2019
@codecov-io
Copy link

Codecov Report

Merging #5584 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5584   +/-   ##
=======================================
  Coverage   36.86%   36.86%           
=======================================
  Files         102      102           
  Lines        7349     7349           
=======================================
  Hits         2709     2709           
  Misses       4289     4289           
  Partials      351      351

@tstromberg
Copy link
Contributor Author

It seems like our script is eating it on wildcards, though I don't see set -f open. Will make the script work in this case:

>> Cleaning up after previous test runs ...
* Cleaning stale test root: /Users/jenkins/minikube-integration/*
find: /Users/jenkins/minikube-integration/*: No such file or directory
find: /Users/jenkins/minikube-integration/*: No such file or directory
find: /Users/jenkins/minikube-integration/*: No such file or directory
rmdir: /Users/jenkins/minikube-integration/*: No such file or directory
ls: /Users/jenkins/minikube-integration/*: No such file or directory
Build step 'Execute shell' marked build as failure

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 9, 2019
@tstromberg tstromberg changed the title Make virtualbox cleanup more resilient to failure jenkins: More resilient VirtualBox VM and test directory cleanup Oct 9, 2019
@tstromberg tstromberg changed the title jenkins: More resilient VirtualBox VM and test directory cleanup jenkins: Resilient VirtualBox VM and test directory cleanup Oct 9, 2019
@tstromberg
Copy link
Contributor Author

This now removes the following out of the jenkins config:

vboxmanage list -l hostonlyifs | grep -w "Name:" | awk '{$1=""; print $0}' | xargs -l vboxmanage hostonlyif remove || true

as it was creating the following error:

+ vboxmanage list -l hostonlyifs
+ grep -w Name:
+ awk '{$1=""; print $0}'
+ xargs -l vboxmanage hostonlyif remove
Oracle VM VirtualBox Command Line Management Interface Version 5.2.18
(C) 2005-2018 Oracle Corporation
All rights reserved.

Usage:

VBoxManage hostonlyif       ipconfig <name>
                            [--dhcp |
                            --ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |
                            --ipv6<ipv6> [--netmasklengthv6<length> (def: 64)]]
                            create |
                            remove <name>


Syntax error: No interface name was specified

@medyagh
Copy link
Member

medyagh commented Oct 10, 2019

one thing I noitced in vboxmanage list is, the order of columns changes, if the VM is "inaccessible".
that why I had I to do this: c5111ef

(probably not related to your PR) but when putting regex on vbox manage, thats something I would be mindful of .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants