Skip to content

[WiP] Fix virtlet restart test on CircleCI #652

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ e2e: &e2e
command: |
build/portforward.sh 8080&
mkdir -p ~/junit
_output/virtlet-e2e-tests -test.v -ginkgo.skip="\[Heavy\]" -ginkgo.skip="\[Disruptive\]" -junitOutput ~/junit/junit.xml -include-unsafe-tests=true
_output/virtlet-e2e-tests -test.v -ginkgo.skip="\[Heavy\]" -junitOutput ~/junit/junit.xml -include-unsafe-tests=true

- store_test_results:
path: ~/junit
Expand Down
48 changes: 24 additions & 24 deletions images/image_skel/prepare-node.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
#!/bin/bash -x
set -o errexit
set -o nounset
set -o pipefail
set -o errtrace

# make debugging this script easier
if [[ -f /dind/prepare-node.sh && ! ( ${0} =~ /dind/ ) ]]; then
exec /dind/prepare-node.sh "$@"
fi
# if [[ -f /dind/prepare-node.sh && ! ( ${0} =~ /dind/ ) ]]; then
# exec /dind/prepare-node.sh "$@"
# fi

PLUGIN_DIR=/kubelet-volume-plugins/virtlet~flexvolume_driver

Expand All @@ -26,23 +26,23 @@ fi
mkdir -p /host-var-lib/libvirt/images /hostlog/virtlet/vms /host-var-lib/virtlet/volumes

# set up KVM
if [[ ! ${VIRTLET_DISABLE_KVM:-} ]]; then
if ! kvm-ok >&/dev/null; then
# try to fix the environment by loading appropriate modules
modprobe kvm || (echo "Missing kvm module on the host" >&2 && exit 1)
if grep vmx /proc/cpuinfo &>/dev/null; then
modprobe kvm_intel || (echo "Missing kvm_intel module on the host" >&2 && exit 1)
elif grep svm /proc/cpuinfo &>/dev/null; then
modprobe kvm_amd || (echo "Missing kvm_amd module on the host" >&2 && exit 1)
fi
fi
if [[ ! -e /dev/kvm ]] && ! mknod /dev/kvm c 10 $(grep '\<kvm\>' /proc/misc | cut -d" " -f1); then
echo "Can't create /dev/kvm" >&2
fi
if ! kvm-ok; then
echo "*** VIRTLET_DISABLE_KVM is not set but KVM extensions are not available ***" >&2
echo "*** Virtlet startup failed ***" >&2
exit 1
fi
chown libvirt-qemu.kvm /dev/kvm
fi
# if [[ ! ${VIRTLET_DISABLE_KVM:-} ]]; then
# if ! kvm-ok >&/dev/null; then
# # try to fix the environment by loading appropriate modules
# modprobe kvm || (echo "Missing kvm module on the host" >&2 && exit 1)
# if grep vmx /proc/cpuinfo &>/dev/null; then
# modprobe kvm_intel || (echo "Missing kvm_intel module on the host" >&2 && exit 1)
# elif grep svm /proc/cpuinfo &>/dev/null; then
# modprobe kvm_amd || (echo "Missing kvm_amd module on the host" >&2 && exit 1)
# fi
# fi
# if [[ ! -e /dev/kvm ]] && ! mknod /dev/kvm c 10 $(grep '\<kvm\>' /proc/misc | cut -d" " -f1); then
# echo "Can't create /dev/kvm" >&2
# fi
# if ! kvm-ok; then
# echo "*** VIRTLET_DISABLE_KVM is not set but KVM extensions are not available ***" >&2
# echo "*** Virtlet startup failed ***" >&2
# exit 1
# fi
# chown libvirt-qemu.kvm /dev/kvm
# fi